Skip to content
Switch branches/tags

Latest commit

* Update version number
* Add streetViewControl setting usage to demo project settings

Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Coverage Status Build Status PyPI version

Django Map Widgets

Configurable, pluggable and more user friendly map widgets for Django PostGIS fields.


The aim of the Django map widgets is to make all Geo Django widgets more user friendly and configurable. Map widgets are currently supporting only Google Map services, but we are planning to add other major map services.


pip install django-map-widgets

Add ‘map_widgets’ to your INSTALLED_APPS in



Collects the static files into STATIC_ROOT.

python collectstatic

Django Admin

from django.contrib.gis.db import models
from mapwidgets.widgets import GooglePointFieldWidget

class CityAdmin(admin.ModelAdmin):
    formfield_overrides = {
        models.PointField: {"widget": GooglePointFieldWidget}

Django Forms

from mapwidgets.widgets import GooglePointFieldWidget, GoogleStaticOverlayMapWidget

class CityForm(forms.ModelForm):

    class Meta:
        model = City
        fields = ("coordinates", "city_hall")
        widgets = {
            'coordinates': GooglePointFieldWidget,
            'city_hall': GoogleStaticOverlayMapWidget,

...and your template should look something like this

<form method="POST" action="">
    {% csrf_token %}


Django Map Widgets needs Jquery dependency to work in your regular views. In Django Admin case, you don't need to provide the jQuery. Just add map widgets to your django admin forms.


Google Map Point Field Widget

Google Map Static Overlay Widget

This widget is working with Magnific Popup jQuery plugin.

Release Notes



  • Removed six package usages. (#117)
  • Added a new general widget setting in order to specify Google JS libraries. (#119)
  • Implemented some improvements for the demo project.


  • Implemented a new demo project with Django 2.x.
  • Fixed Django Admin jQuery conflicts. (#100)
  • Fixed a new widget JS instance initialising issue for Django Admin Inlines. (#84)
  • Added Python 3.8 env settings to TravisCI configuration.


  • Fixed python six module import issue.
  • Fixed PostGIS setup errors in CI pipeline.
  • Added Estonian language support.


  • Fixed Python 3.6, Django 2.x compatible issues.
  • Fixed SRID format converter issues.
  • Removed pyproj package dependency.
  • Various development infrastructure updates. (Docker, Fabric files etc.)
  • Point map widget JS objects associated to the map HTML elements with jQuey $.data method.
  • Passing Google Place AutoComplete full response object to jQuery triggers.


  • Google Place Autocomplete object binding to jQuery triggers.
  • Implemented Google Geocoding support for the marker coordinates.
  • Added custom widget settings feature for each widget.
  • Added Portuguese localisation support.
  • Fixed Google Place Autocomplete widget bugs in Django Admin Inlines.
  • Fixed Python 3.6 errors.
  • Fixed Javascript bugs.
  • The GitHub repository Integrated with Travis CI.
  • Implemented unit tests for backend code. (%100 code coverage)
  • Change development environment from Vagrant to Docker.


  • Full documentation integrated to
  • Fixed Google Map static widget issues.
  • Added Russian localisation support.
  • Added [Google Places Autocomplete] options support.
  • Fixed CSS issues.