This app makes it easy to display a map for given address in django templates. No API keys, manual geocoding, html/js copy-pasting or django model changes is needed.<br /><br />Installation<br /><br />pip install geopy<br />pip install django-easy-maps<br /><br />Then add 'easy_maps' to INSTALLED_APPS and run ./manage.py syncdb (or ./manage.py migrate easy_maps if South is in use)<br /><br />Usage<br /><br />This app provides an easy_map template tag:<br /><br />{% easy_map <address /> [<width /> <height />] [<zoom />] [using ] %}<br /><br />Examples:<br /><br />{% load easy_maps_tags %}<br /><br /><!-- Default map with 300x400 dimensions --><br />{% easy_map "Russia, Ekaterinburg, Mira 32" 300 400 %}<br /><br /><!-- Variable address, custom detail level and custom template --><br />{% easy_map address 200 200 5 using 'map.html' %}<br /><br />The coordinates for map will be obtained using google geocoder on first access. Then they'll be cached in DB. Django's template caching can be used later in order to prevent DB access on each map render:<br /><br />{% load easy_maps_tags cache %}<br /><br />{% cache 600 my_map firm.address %}<br /> {% easy_map firm.address 300 400 %}<br />{% endcache %}
Requirements: |
No special requirements
|
Platforms: |
*nix, Linux |
Keyword: |
Access, Address, Cache, Custom, Detail, Dimensions, Django, Easy Map, Easy Maps Tags, Endcache, Firmaddress, Install, Level, Managepy, Map, Maphtml, Quot, Template, Variable |
Users rating: |
0/10 |
|