Thanks to both of you.  It makes perfect sense now.  I'll just
setMap(null) and back for the entire set.

There's a fair bit of overlap in my polygons.  I've implemented
rollovers, so I need to ensure that my polygons are always ordered
with the smaller ones on top, even though the polygons change with map
center and zoom.  Thus the z-order issue.

At the moment I'm rendering exactly 100 polygons of various shapes and
sizes, but that number could go up (or down) depending on performance
(network as well as rendering).

The app is Mobcast (http://www.mobca.st/map), but the polygon-related
stuff is not public yet.  If you're curious, email me and I'll send
you a private link.  It's built on Maps v3 with a GWT wrapper.

Thanks,
Jeff

On Feb 25, 5:46 am, bratliff <bratl...@umich.edu> wrote:
> On Feb 25, 3:53 am, Jeff Schnitzer <j...@infohazard.org> wrote:
>
> > How can I get set the zIndex of a Polygon?
>
> > I display a few hundred polygons on a map.  When the map moves around,
> > I fetch some new polygons and render them.
>
> > I can initialize the original zIndexes in the order that I place the
> > polygons, yes.  But then I get some new polygons and need to
> > interleave them with the old ones.  I don't want to delete and redraw
> > every single polygon just to set the zIndexes.
>
> > Is there a way to get the raw element that represents a polygon?
>
> > Thanks,
> > Jeff
>
> Are you using the API to display a few hundred polys ?
>
> Do you have an example you could post ?
>
> The zIndex is not an issue unless the polys overlap.  CANVAS uses a
> different color blending algorithm than SVG.  It can be controlled
> with the "globalCompositeOperation" but to my knowledge, the API does
> not provide a way to access it.
>
> Each CANVAS / SVG / VML element resides in a parent DIV.  For CANVAS,
> polys in the same tile reside in the same CANVAS element.  Changing
> the zIndex of the parent DIV will reprioritize the polys but the
> results may differ between browsers.

-- 
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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to