Skip to main content

Template tags for creating Google Maps from GeoDjango fields.

Project description

This app provides template tags for easily creating Google Maps from GeoDjango models.

Installation

  1. Add GOOGLE_API_KEY to your settings.

  2. Add 'gmaps' to your INSTALLED_APPS.

Usage

{% load gmaps %}
<div id="mymap"></div>

{% gmap_js %} {# prints out the <script> tag calling the Google Maps API #}

{% map "mymap" object.location %}
    {% marker someobj.location %}
    {# all tags accept optional parameters that will be passed to the js constructor #}
    {% marker someobj.location "title" "'Hello, World!'" %}
    {% polygon someobj.mpoly %}
    {% polyline someobj.mpoly %}
{% endmap %}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-gmaps-0.0.2.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file django-gmaps-0.0.2.tar.gz.

File metadata

File hashes

Hashes for django-gmaps-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5f1eea66c93d5277bc6e634c4783ce01760ad30d2315bda57129e4276a6e3776
MD5 13e807c378cdd9a4e7463e88d5fee1f7
BLAKE2b-256 ffbd9ab3c055b983108592571b889aac871f9a207358da3f8a12b96f93bec0ed

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page