What steps will reproduce the problem?
1. create a Markercluster with averageCenter
Expected result:
the cluster to have the average center of contained markers
Actual result:
random center
Version: 1.0
There is a bug in the way the average center is calculated. Eg. if the points
have lat = [100, 140] the center has lat 80. If the points have lat = [140,
100] the center has lat 120. The correct formula is:
var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l;
var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l;
Original issue reported on code.google.com by vcausar...@gmail.com on 26 Oct 2010 at 1:49
Original issue reported on code.google.com by
vcausar...@gmail.com
on 26 Oct 2010 at 1:49