Thanx!

I have lots of markers I want to bring to the front but still have
them keep its relative z index to each other.  This is what I'm trying
to do:

var point = new
google.maps.Point( google.maps.fromLatLngToDivPixel( marker.getPosition() ) );

marker.setZIndex( 10000 + point.y );

This however doesn't work.  I suspect it's my knowledge in JavaScript
and the Google Maps API.

Any help further into this appreciated.

, MacGoose


On 26 Jul, 03:22, Ben Appleton <[email protected]> wrote:
> Marker .getZIndex will return the value of the zIndex property that
> you set, if any.
>
> If a marker is dragging it is assigned a zIndex of 1000000* to ensure
> it appears in front of all other markers.  Else if a marker has an
> explicit zIndex it is rendered at that zIndex.  Else a marker is
> rendered with a zIndex that is its y-coordinate returned by
> MapCanvasProjection .fromLatLngToDivPixel
> (http://code.google.com/apis/maps/documentation/javascript/reference.h...).
>
> * Value subject to change.
>
> To bring a marker to front I suggest assigning it a large zIndex such as 
> 10000.
>
>
>
> On Sat, Jul 24, 2010 at 12:03 AM, Rossko <[email protected]> wrote:
> >> So what I would like to do is calculate the undefined zIndex and add
> >> 999 so they look better.
>
> > You could try the documented marker getZIndex method
> >  http://code.google.com/apis/maps/documentation/javascript/reference.h...
> > although others have said it doesn't seem to work, in the past
>
> > --
> > 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 
> > athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

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