【发布时间】:2014-01-10 15:15:00
【问题描述】:
我正在使用Marker Clusterer Plus 对谷歌地图上的标记进行分组,但 enableRetinaIcons 选项似乎不起作用。
// Custom style to alter the default font color (style is always the same).
var styles = [
{
url: 'PATH_TO_MY_66x66px_IMAGE',
textColor: '#ddddd',
textSize: 18,
width: 33,
height: 33,
}
];
// Calculator function to determine which style to use (I only have one)
var calculator = function (markers, iconstyles){
return{ text: markers.length.toString(), index:1};
};
// Set Options
var clusterOptions = {
title: 'Cluster Title',
enableRetinaIcons: true,
styles: styles,
calculator: calculator
}
// Add to map
new MarkerClusterer(this.map, this.markers, clusterOptions);
enableRetinaIcons 选项似乎不起作用,图像显示为两倍大小。
将宽度设置为 66x66px 也无济于事。
有人知道如何正确配置吗?
【问题讨论】:
标签: google-maps retina-display markerclusterer