Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps 如何在谷歌地图中隐藏聚类标记上的数字?_Google Maps_Google Maps Markers - Fatal编程技术网

Google maps 如何在谷歌地图中隐藏聚类标记上的数字?

Google maps 如何在谷歌地图中隐藏聚类标记上的数字?,google-maps,google-maps-markers,Google Maps,Google Maps Markers,所以我有这个: 但我想要的是: 我很确定我可以在这里指定一个选项: var options = { gridSize: 80, imagePath: imagePath , someOption : iAmMissing ?? } var mc = new MarkerClusterer(map, mapmarkers, options); google.maps.event.addListener(mc, 'clusteringend', function(){

所以我有这个:

但我想要的是:

我很确定我可以在这里指定一个选项:

var options = {
    gridSize: 80,
    imagePath: imagePath ,
    someOption : iAmMissing ??
}
var mc = new MarkerClusterer(map, mapmarkers, options);
google.maps.event.addListener(mc, 'clusteringend', function(){
    setTimeout(fixMyPageOnce, 1);
});
但我似乎找不到一个选择。这是正确的位置还是有其他方法可以消除圆圈中的数字?

创建一个自定义“计算器”函数,将返回值的“文本”属性设置为“”

代码片段:

函数初始化(){
var center=new google.maps.LatLng(52.4357808,4.9913156999973);
变量映射选项={
缩放:12,
中心:中心,,
mapTypeId:google.maps.mapTypeId.TERRAIN
};
map=new google.maps.map(document.getElementById('map-canvas'),mapOptions);
对于(i=0;i
html,
身体,
#地图画布{
宽度:100%;
身高:100%;
}

您只需使用“样式”选项并将“文本大小”选项设置为略高于0:

var options = {
        gridSize: 80,
        styles: [{
                url: imagePath,
                height: 29,
                width: 29,
                anchor: [0, 0],
                textSize: 0.001
              }, {
                url: imagePath,
                height: 49,
                width: 49,
                anchor: [0, 0],
                textSize: 0.001
              }, {
                url: imagePath,
                width: 65,
                height: 65,
                anchor: [0, 0],
                textSize: 0.001
              }]
    }

它对我有效。

只需将
textColor
设置为
透明

var options = {
    textColor: 'transparent',
    gridSize: 80,
    imagePath: imagePath ,
    someOption : iAmMissing ??
}
var options = {
    textColor: 'transparent',
    gridSize: 80,
    imagePath: imagePath ,
    someOption : iAmMissing ??
}