Expected result:
Fit to bounds of visible markers only, when ignoreHidden option is set to false.
Actual result:
All markers are taken into account, visible or not.
Version: 2.1.2 [May 28, 2014]
Additional comments:
Possible solution, adding a simple IF statement:
MarkerClusterer.prototype.fitMapToMarkers = function () {
var i;
var markers = this.getMarkers();
var bounds = new google.maps.LatLngBounds();
for (i = 0; i < markers.length; i++) {
if (!this.ignoreHidden_ || markers[i].getVisible()){
bounds.extend(markers[i].getPosition());
}
}
this.getMap().fitBounds(bounds);
};
Original issue reported on code.google.com by albert.p...@interactiu.cat on 11 Jun 2014 at 2:16
Original issue reported on code.google.com by
albert.p...@interactiu.cat
on 11 Jun 2014 at 2:16