Help:

I'm trying to create a site that places benefits reports on a map with
the marker color changing by different goal/subject areas.  The
problem is that many have the same location and the marker on top
(highest z index?) is not the one is represented when the mouse click
listener calls the Infowindow.  See this simplified example here:

http://mysite.verizon.net/jabunch/Test_2.html

look at Georgia, Atlanta.  The last marker found in the side window
and the one on top in the map has a goal of "Environment and Energy"
and correctly displays as green marker.   However, when clicked the
infowindow that is called up is for the first record (what is pulled
is inconsistent) in the sidebar list with a safety goal area. !

Note, this seems to be a zindex problem caused by marker
optimization.  It goes away when the optimization is set to false.
i.e.

        function createMarker(latlng, mtyp, name, misc, html) {
                var contentString = html;
                var marker = new google.maps.Marker({
                        optimized: false,
                        position: latlng,
                        map: map,
                        shadow: iconShadow,
                        icon: getMarkerImage(mtyp),
                        shape: iconShape,
                        zIndex: Math.round(latlng.lat()*-100000)<<5
                        });

But setting the optimized paramter to false causes the site to fail
when the full dataset is loaded and mapped.

Is there anyway we can set the zindex of the markers and infowindow to
insure that the marker on top is found when mouse clicked and its
infowindow is called and still keep optimized as true?

In the full implementation we are also toggling clustering to allow
all of the markers to be seen, but this hides the thematic geographic
distribution of the data that we also want to display.

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