Skip to content

Commit

Permalink
gis: Fixed #6289 (added extra_context keyword to GoogleMap). Than…
Browse files Browse the repository at this point in the history
…ks omat & arien.

git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7027 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jbronn committed Jan 18, 2008
1 parent 8da13e6 commit feebe39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion django/contrib/gis/maps/google/gmap.py
Expand Up @@ -18,7 +18,8 @@ class GoogleMap(object):
def __init__(self, key=None, api_url=None, version=None, def __init__(self, key=None, api_url=None, version=None,
center_lat=0.0, center_lon=0.0, zoom=1, center_lat=0.0, center_lon=0.0, zoom=1,
dom_id='map', load_func='gmap_load', 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 # 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 # if not passed in as a parameter. The use of an API key is
Expand Down Expand Up @@ -67,6 +68,7 @@ def __init__(self, key=None, api_url=None, version=None,
'load_func' : load_func, 'load_func' : load_func,
'zoom' : zoom, 'zoom' : zoom,
} }
params.update(extra_context)
self.js = render_to_string(template, params) self.js = render_to_string(template, params)


@property @property
Expand Down

0 comments on commit feebe39

Please sign in to comment.