Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps Location and Area Fields for Django

I am looking for two Django model fields that are easy to use in admin and gives a Google maps interactive interface.

LocationField

Stores longitude and latitude, admin user clicks on a map to mark the location.

AreaField

Stores a comma separated string of locations, admin user creates a shape on a map to mark an area.

I found a number of them but which one would you recommend for the above requirements?

  • http://pypi.python.org/pypi/django-easy-maps
  • http://code.google.com/p/django-gmapi/
  • http://code.google.com/p/django-coordinatesfield/

There is of course also geodjango but it seems a bit overkill for this project.

like image 674
sunn0 Avatar asked Mar 28 '11 10:03

sunn0


2 Answers

I know this post is old but in case anyone needs another tool, i've been using the django-geoposition app that helps to create a model field that can hold a geoposition and a corresponding admin widget.

like image 91
pyjavo Avatar answered Sep 30 '22 03:09

pyjavo


We have been using django-easy-maps but with a custom (non-admin) interface. If Google can't find the location from the street address, we present a navigable map and allow the user to select a position, then store the latitude and longitude. Otherwise, there is likely to be too many street addresses that the Google maps can't parse.

like image 31
Jeff Bauer Avatar answered Sep 30 '22 04:09

Jeff Bauer