Re: 2 or more encoded polylines WITHOUT being connected
On Jun 24, 4:25 pm, majestic <john.a.ea...@gmail.com> 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/reference.html#GMap2.openInfoWindowHtml
-- Larry
>
> });
>
> Cheers
>
> On Jun 24, 7:49 am, Andrew C Leach <andrew.le...@bcs.org> wrote:
>
>
>
> > On 24 June 2010 14:41, majestic <john.a.ea...@gmail.com> 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 google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home