Simple Google Maps Integration For Django
pip install django-simple-gmap
Setting things up:
- Add
simple_gmap
toINSTALLED_APPS
- Load the django-simple-gmap template tags in your template
{% load simple_gmap_tags %}
- Add
{% gmap_init 13.940823 121.163281 %}
in your HTML head section - Add an HTML input element with an id
gmap-text-input
- Add an HTML div element with an id
gmap-canvas-object
{% load simple_gmap_tags %} <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Django Simple GMap Test</title> {% gmap_init 13.940823 121.163281 %} </head> <body> <div> <input id="gmap-text-input" type="text" placeholder="" value=""> </div> <div> </div> <div> <div id="gmap-canvas-object"></div> </div> </body> </html>