On Jun 29, 4:54 pm, xelawho <[email protected]> wrote: > > you can't (as far as I am aware) attach an infowindow to a map, which > is why this.map.openInfoWindowHtml will fail.
Actually you can: http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.openInfoWindow The problem the OP has is that you can't get the map from a marker ("this"), in order to open the map's infoWindow. You have to use the marker and open its infoWindow. In a click handler, "this" is the object which is clicked. It's not the same "this" as you use elsewhere. In the handler function, "this" is the marker, and this.map doesn't exist. It *could* exist, if you create that property when you create the marker. But I definitely do not recommend adding an entire GMap2 object to every marker, things will grind to a halt very quickly and you will probably run into recursion issues. So: just use the marker and its openInfoWindow method. > I suspect you are not listening to the advice you are being given. > Maybe looking at some of the basics will clear things up for > you:http://econym.org.uk/gmap/ That's entirely right. However when people don't get the advice they want to hear they carry on asking the question. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
