Open GoogleCodeExporter opened 8 years ago
This issue has been raised before and the thought has been to ensure that the
clustered markers appear above everything else. Let me reconsider by switching
to overlayPane on a production map to see if anything breaks.
Original comment by garylitt...@gmail.com
on 13 Dec 2011 at 4:31
By the way: if switching to overlayImage pane there is much work to be done in
addition to the single line change you mentioned.
Original comment by garylitt...@gmail.com
on 13 Dec 2011 at 4:36
Would it be possible instead to set a high zIndex? From my reading of the
Google Maps v3 docs, that is the recommended way. I have changed my code with
the above fix and you may verify on http://www.raditaz.com or (development)
http://quesofresco.raditaz.com - create user -> Edit Station -> Edit Location.
If you want I will gladly test and submit code.
The fix noted above does not break for what I am doing but will test other
overlays.
Original comment by ptan...@raditaz.com
on 13 Dec 2011 at 4:41
I am definitely missing something, then. I'll review other code tests you use.
So far it works for my (admittedly limited) use case.
Original comment by ptan...@raditaz.com
on 13 Dec 2011 at 4:44
I don't think the click handler works when the pane is changed to overlayImage.
Not sure why, but I haven't really studied the issue yet. The cluster icons
need to be standard markers if in overlayImage pane, so that will affect a lot
of code as well. I'm beginning to see why the original creator of
MarkerClusterer did it the way he did.
Original comment by garylitt...@gmail.com
on 13 Dec 2011 at 4:47
This code works for a click event handler:
function createClusterer(markers) {
var cluster_styles = [{
// [yoffset, xoffset] from top left: cluster location bottom center
//anchorIcon: [40, 20],
// we actually want the real center (simplifies things later)
width: 40,
height: 40,
url: /images/stations/map_pin_multiple.png
}],
opts = {
averageCenter: true,
gridSize: 40,
zoomOnClick: false,
imagePath: images/stations,
imageExtension: png,
imageSizes: [40],
styles: cluster_styles,
calculator: self.cluster_calculate,
zoomOnClick: false,
title: Cluster of Stations
},
clusterer = new MarkerClusterer(self.map, markers, opts);
google.maps.event.addListener(clusterer, 'click', self.onClusterClicked);
return clusterer;
}
What I used was google.maps.addListener() not google.maps.addDomListener (used
in ClusterIcon.prototype.onAdd,
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererpl
us/src/markerclusterer.js:128).
Original comment by ptan...@raditaz.com
on 13 Dec 2011 at 5:20
Original issue reported on code.google.com by
ptan...@raditaz.com
on 10 Dec 2011 at 2:17