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.