When trying to set the text position within the cluster markers, passing in
positions using the opt_anchor property (see code below) does nothing; instead
the dafult central position is always used.
var clusterStyles = [
{
url: '/img/cluster1.png',
width: 41,
height: 60,
opt_anchor: [2, 2]
},
{
url: '/img/cluster2.png',
width: 41,
height: 60,
opt_anchor: [2, 2]
},
{
url: '/img/cluster3.png',
width: 41,
height: 60,
opt_anchor: [2, 2]
}];
var clusterOptions = {
gridSize: 40,
maxZoom: 15,
zoomOnClick: true,
styles: clusterStyles
};
var clusterer = new MarkerClusterer(map, markers, clusterOptions);
This is because of a missing trailing underscore where the property is
assigned, in markerclusterer.js at line 939:
this.anchor = style.opt_anchor;
Should be:
this.anchor_ = style.opt_anchor;
Version: 1.0
Browser / Operating System: All