Hi Larry,

I was close! That worked perfectly, thank you!

Cheers

On Jun 24, 5:51 pm, "[email protected]" <[email protected]>
wrote:
> On Jun 24, 4:25 pm, majestic <[email protected]> wrote:
>
> > Hi Andrew,
>
> > Have got the code working for all the polylines on different overlays
> > now.
>
> > But, can't seem to get the right syntax for adding an infowindow when
> > polyline clicked.
>
> > Any ideas?
>
> > I have tried this so far:
>
> > GEvent.addListener(encodedPolyline, 'click', function() {
> >  encodedPolyline.openInfoWindow((38.66801200,-105.25580700), 'hello');
>
> Polylines do not have the openInfoWindow method.  You need to decide
> where to open it (the latlng of the click? the nearest vertex of the
> polyline? the center of the bounds?) then use map.openInfoWindow,
> which you are close to having the right syntax for, it should be
> something like:
> map.openInfoWindow(new GLatLng(38.66801200,-105.25580700), 'hello');
>
> http://code.google.com/apis/maps/documentation/javascript/v2/referenc...
>
>   -- Larry
>
>
>
>
>
> > });
>
> > Cheers
>
> > On Jun 24, 7:49 am, Andrew C Leach <[email protected]> wrote:
>
> > > On 24 June 2010 14:41, majestic <[email protected]> wrote:
>
> > > > Ok... I'll bite... which one would you recommend? ;)
>
> > > >> > All lines are the same.. thickness,color etc.
> > > >> > When lines clicked should go off to another page somehow.
>
> > > The only way you are going to get different lines each with their own
> > > click behaviour is to make each one a separate overlay.- Hide quoted text 
> > > -
>
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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