On Jun 29, 8:54 am, xelawho <[email protected]> wrote:
> > Any idea to get 'map' property in here in the click function?
> > * GEvent.addListener(this.marker,'click',
> >                 function() {   *
> > *               this.map.openInfoWindowHtml(point,this.label
> > || this.address);
> >              }*
>
> what's with all the "this."
>
> if you add an event listener to a marker, it already knows which
> marker you are talking about:
>
> GEvent.addListener(marker, "click", function() {
>           marker.openInfoWindowHtml(html);
>         });
>
> (where html can be anything you define)
>
> you can't (as far as I am aware) attach an infowindow to a map, which
> is why this.map.openInfoWindowHtml will fail.

There are two different openInfoWindowXXX definitions:
1. on the map:
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.openInfoWindow
2. on a marker:
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMarker.openInfoWindow

  -- Larry

>
> 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/

-- 
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.

Reply via email to