Interestingly, the only difference between your code and my code (in
terms of setOptions) is that the array of points is set in both the
anonymous function calls for mouseover and mouseout.  I put that into
my code and it seems to work in Firefox, Chrome, and Safari.  In IE,
if you hover over a line, the line will flicker in and out and then
the mouseout takes effect.  For the Markers, it works fine for the
polyline.

Try your code in IE and you'll see the same thing.  Any clue on why
this is happening for the polyline mouseover event?  I've implemented
this for the http://www.mentoreng.com/testing/public/map2.html.  Hover
over the last two bus stops on the far right for Route 25 and 26.


On Jul 12, 8:54 am, Marx Zeng <[email protected]> wrote:
> http://marx-tseng.appspot.com/maps/Polyline_zIndex.html
>
> On 7月12日, 下午9時47分, Marx Zeng <[email protected]> wrote:
>
>
>
> > Try this.
>
> > var polyline = new google.maps.Polyline({
> >         path: paths,
> >         strokeColor: "#FF0000",
> >         strokeWeight: 10,
> >         map: map,
> >         zIndex: 100
>
> > });
>
> > google.maps.event.addListener(polyline, 'mouseover', function(event) {
> >         p1.setOptions({
> >                 path: paths,
> >                 strokeColor: "#00FF00",
> >                 strokeWeight: 10,
> >                 zIndex: 300
> >         });});
>
> > google.maps.event.addListener(polyline, 'mouseout', function(event) {
> >         p1.setOptions({
> >                 path: paths,
> >                 strokeColor: "#FF0000",
> >                 strokeWeight: 10,
> >                 zIndex: 100
> >         });
>
> > });
>
> > On 7月10日, 上午1時06分, CSharp <[email protected]> wrote:
>
> > > Is it possible to put one polyline overlay overtop of the another
> > > polyline that overlaps it when a onmouseover event fires?  I tried to
> > > set the strokeOpacity to 1.0 and the zIndex to 900 and the line on the
> > > bottom seems to always mesh the color with the top one.
>
> > > You can see the example here (select Route 25 and 26 where the lines
> > > overlap in some sections):
>
> > >http://www.mentoreng.com/testing/public/map2.html- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to