Opened 11 years ago

Closed 4 years ago

#11072 closed New feature (wontfix)

Add Info Window Html to GMarker

Reported by: Ubercore Owned by: jbronn
Component: GIS Version: master
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


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, 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 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by Ubercore

Attachment: add_info_window_html.diff added

comment:1 Changed 11 years ago by Ubercore

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 Changed 11 years ago by jbronn

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

comment:3 Changed 11 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

comment:4 Changed 11 years ago by James Bennett

milestone: 1.2

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

comment:5 Changed 9 years ago by Julien Phalip

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

comment:6 Changed 9 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 Changed 9 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:8 Changed 4 years ago by Claude Paroz

Resolution: wontfix
Status: assignedclosed

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

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