From feebe394298d0c2881e903690d0dbeac6b619278 Mon Sep 17 00:00:00 2001 From: Justin Bronn Date: Fri, 18 Jan 2008 16:49:51 +0000 Subject: [PATCH] gis: Fixed #6289 (added `extra_context` keyword to `GoogleMap`). Thanks omat & arien. git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7027 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/gis/maps/google/gmap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django/contrib/gis/maps/google/gmap.py b/django/contrib/gis/maps/google/gmap.py index 805dc25af4..32713fc7b0 100644 --- a/django/contrib/gis/maps/google/gmap.py +++ b/django/contrib/gis/maps/google/gmap.py @@ -18,7 +18,8 @@ class GoogleMap(object): def __init__(self, key=None, api_url=None, version=None, center_lat=0.0, center_lon=0.0, zoom=1, dom_id='map', load_func='gmap_load', - kml_urls=[], template='gis/google/js/google-map.js'): + kml_urls=[], template='gis/google/js/google-map.js', + extra_context={}): # The Google Maps API Key defined in the settings will be used # if not passed in as a parameter. The use of an API key is @@ -67,6 +68,7 @@ class GoogleMap(object): 'load_func' : load_func, 'zoom' : zoom, } + params.update(extra_context) self.js = render_to_string(template, params) @property