Opened 16 years ago
Closed 8 years ago
#11072 closed New feature (wontfix)
Add Info Window Html to GMarker
Reported by: | Ubercore | Owned by: | jbronn |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Normal | Keywords: | googlemaps marker gis |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I did a quick search for this and didn't find any previous work.
It allows you to set HTML for a GInfoWindow on an instance of a GMarker. No support for options on the info window yet, this is just the simplest case.
I did see that it's possible to accomplish this using the GEvent class in overlays.py, but I think there's value in being able to set it directly on the marker.
google-map.js uses bindInfoWindowHtml() to add the info window when the marker is added.
A more complete solution might involve implementing GInfoWindow and GInfoWindowOptions, but I didn't want to implement them since they have no public constructor in the Google Maps API. Maybe represent the info window as a tuple of (html, { options})?
Anyway, this tackles the simplest case.
Example usage:
marker = GMarker(object.location, title=object.address) marker.infowindowhtml = "<p>Info Window!</p>";
Attachments (1)
Change History (9)
by , 16 years ago
Attachment: | add_info_window_html.diff added |
---|
comment:1 by , 16 years ago
comment:2 by , 15 years ago
milestone: | → 1.2 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 by , 15 years ago
milestone: | 1.2 |
---|
1.2 is feature-frozen, moving this feature request off the milestone.
comment:5 by , 14 years ago
Needs documentation: | set |
---|---|
Needs tests: | set |
Severity: | → Normal |
Type: | → New feature |
comment:8 by , 8 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
contrib.gis.maps
has been removed (#26697).
Sorry, my example has a typo. It should have been