我收到了以下代码:
var options = {
styles: [
{
url: 'assets/images/marker/m1.png',
height: 37,
width: 25,
anchorText:[0,-150],
},
{
url: 'assets/images/marker/m2.png',
height: 37,
width: 25,
anchorText:[0,-150],
},
{
url: 'assets/images/marker/m3.png',
height: 37,
width: 25,
anchorText:[0,-150],
},
{
url: 'assets/images/marker/m4.png',
height: 37,
width: 25,
anchorText:[0,-150],
},
{
url: 'assets/images/marker/m5.png',
height: 37,
width: 25,
anchorText:[0,-150],
}
],
maxZoom: 10
};
我读到anchorText可以在x或y方向(以像素为单位)移动集群内的数字但不知何故它没有。
API的内容再次发生了变化吗?
答案 0 :(得分:1)
如果您使用的是this MarkerClusterer library,则设置标签文字的锚点位置的样式属性的名称为anchor
,而不是anchorText
。
请查看this source code comment有关支持的选项。
' anchor' :(数组)标签文本的锚位置。