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)

add_info_window_html.diff (2.4 KB ) - added by Ubercore 16 years ago.

Download all attachments as: .zip

Change History (9)

by Ubercore, 16 years ago

Attachment: add_info_window_html.diff added

comment:1 by Ubercore, 16 years ago

Sorry, my example has a typo. It should have been

marker = GMarker(object.location, title=object.address)
marker.info_window_html = "<p>Info Window!</p>";

comment:2 by jbronn, 15 years ago

milestone: 1.2
Owner: changed from nobody to jbronn
Status: newassigned

comment:3 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedAccepted

comment:4 by James Bennett, 15 years ago

milestone: 1.2

1.2 is feature-frozen, moving this feature request off the milestone.

comment:5 by Julien Phalip, 14 years ago

Needs documentation: set
Needs tests: set
Severity: Normal
Type: New feature

comment:6 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:8 by Claude Paroz, 8 years ago

Resolution: wontfix
Status: assignedclosed

contrib.gis.maps has been removed (#26697).

Note: See TracTickets for help on using tickets.
Back to Top