Hi all, I'm developing a V3 map which uses a custom tile layer. For each custom tile, I've added a 'mouseover' event handler which I can use to populate markers on a tile-by-tile basis as the user pans around the map (by performing ajax calls behind the scenes).
However, when I add a google.maps.Polygon to the map, and then remove that polygon, I can no longer detect mouseover events for each tile. I notice that the custom tile layer images are placed in the 'mapPane' with a z-index of 100. The polygon is added to the 'overlayLayer' with a z-index of 101 - hence preventing mouseover events from being captured on the mapPane tiles. At this point, the maps are behaving as I would expect. However, when I *remove* the polygon, I notice that the overlayLayer remains populated with svg tags, presumably for performance reasons when adding subsequent polygons. This prevents mouseover events from being detected on the tiles. I've tried setting the 'clickable' property of the polygon to false, but that doesn't seem to help. I've also tried using jQuery to remove all the overlayLayer child nodes manually after removing a polygon - which works initially - but creates problems when re-adding a new polygon. I've also been looking for a way to specify which map pane the custom tile layer should belong to - but couldn't see a clear way in the API. For reference, here are the map panes and z-indexes as I understand them: mapPane: 100 > custom tiles overlayLayer: 101 > polygons overlayShadow: 102 overlayImage: 103 > markers floatshadow: 104 overlayMouseTarget: 105 floatpane: 106 Sorry, I can't post a link to the map I'm working on as it's part of an intranet application. Thanks, Fred. -- 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.
