Opened 17 years ago
Closed 17 years ago
#6289 closed (fixed)
Allow passing extra context to google-map.js
Reported by: | omat at gezgin.com | Owned by: | jbronn |
---|---|---|---|
Component: | GIS | Version: | gis |
Severity: | Keywords: | gis, google maps, javascript | |
Cc: | jbronn@…, omat@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The javascript template for displaying a Google Map is rendered inside the GoogleMap object with predefined parameters. Sometimes it may be useful to pass extra variables to the javascript temlaplates context.
For that, I patched the gmap.py by adding 2 lines to allow passing an extra_context dictionary.
Attachments (2)
Change History (8)
by , 17 years ago
comment:1 by , 17 years ago
Version: | SVN → gis |
---|
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:3 by , 17 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Ready for checkin → Unreviewed |
Sounds like a good idea, and I'm all for it -- but I just found out about the ticket so I need to review it first before I'll check it in. Thanks for contributing.
comment:4 by , 17 years ago
Cc: | added |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
If we are to go the keyword argument route I'd prefer to call it extra
instead of extra_content
(similar to IDL syntax). Or we could take it one step further -- add **kwargs
, and have whatever additional keywords be sent to the template. A concern would be wanting to add a keyword argument in the future and messing up someone's template.
So I'm open to suggestions -- your thoughts?
comment:5 by , 17 years ago
Triage Stage: | Design decision needed → Ready for checkin |
---|
On second thought extra_context
is consistent with the Django API (specifically for generic views). No design design required.
comment:6 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
modified version of gmap.py to allow passing extra context to the js template