Google maps in Django admin

Google maps in Django admin – each map is an object and can be configured separately in the admin. There is a live preview right there in the admin. Configurable properties are: dimensions, marker location, map center location, zoom, map type (satellite, hybrid etc.). Any other attribute could be added if needed.

Map and admin inputs are connected by JavaScript in such a way that a change on the inputs reflect on the map instantly and vice-versa: a change on map (e.g. dragging the marker) will instantly update the inputs.

There are also special maps called “map aggregations” that show markers from many related maps in a single map. This distinction makes it simple to have a map with one marker (e.g. to go along with a page dedicated to the object) and also a map with many markers (perhaps filtered by some criteria) to show “all objects”. Also, each map can be tweaked separately, including the “map aggregations” maps.

Maps and the admin interface degrade gracefully as do Google maps themselves.

Excellent gmapi aplication was used as a solid base for this enhancement.