var clusterStyles = [
{
textColor: 'white',
url: 'http://example.com/image.png',
height: 40,
width: 40,
textSize: 14
},
我正在从网址获取图标图像,并尝试通过调整高度和宽度来调整大小,现在图像图标只是切成两半,另一半消失了。如何在不剪掉部分图像的情况下缩小尺寸?
最佳答案
尝试样式参数 设置标记簇的样式选项(这些是默认样式)
mOptions = {
styles: [{
height: 53,
url: "pic_link",
width: 53
},
{
height: 40,
url: "pic_link",
width: 46
}
]
};
并调用构造函数
var clust= new MarkerClusterer(map, markers, mOptions);
关于javascript - 如何减小谷歌地图中簇图标的大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33587001/