Closed GoogleCodeExporter closed 9 years ago
I can confirm this happens to us as well. To make things worse, we seem to lose
the ability to click clusters in iPad if indeed you have already clicked one
before.
Original comment by devinray...@gmail.com
on 18 Apr 2012 at 9:01
We got the answer.....We have always know that you had to call the fitbound
method twice for IOS to work even for normal marker let alone ClusterMarkers.
We added this to the ClusterMarker.js code and it still didn't work, this was
because by the time the second one ran the getbounds method returned nothing,
so we have saved it away and called again.
In ClusterMarker.js update the following method .... just cut and paste
ClusterIcon.prototype.triggerClusterClick = function () {
var markerClusterer = this.cluster_.getMarkerClusterer();
// Trigger the clusterclick event.
google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_);
if (markerClusterer.isZoomOnClick()) {
// Zoom into the cluster.
var theBounds = this.cluster_.getBounds();
this.map_.fitBounds(theBounds);
setTimeout(this.map_.fitBounds(theBounds), 100);
}
};
Original comment by harvey.s...@steria.co.uk
on 20 Apr 2012 at 1:06
Harvey,
Thanks for the fix. Not sure why iOS requires two calls to fitbound but if it
works, great!
I have modified the trunk release of MarkerClustererPlus to incorporate your
fix. I will tag v2.0.12 soon.
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererpl
us/
gary
Original comment by garylitt...@gmail.com
on 21 Apr 2012 at 3:26
MarkerClustererPlus 2.0.12 has now been tagged and incorporates this fix.
(The original MarkerClusterer has not yet been fixed -- it's not my project.
The fix that Harvey mentioned above still has to be applied if you're using the
old MC.)
http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplu
s/2.0.12/
Original comment by garylitt...@gmail.com
on 21 Apr 2012 at 3:37
Original issue reported on code.google.com by
harvey.s...@steria.co.uk
on 16 Apr 2012 at 1:24