How to hide the numbers on a cluster marker in Google Maps?

后端 未结 3 1187
清歌不尽
清歌不尽 2020-12-22 06:13

So I have this:

But what I want is this:

I\'m pretty sure there should be an option I can specify here:

var options = {
            


        
3条回答
  •  春和景丽
    2020-12-22 06:57

    You can just use the "styles" options and set the "textSize" option slightly above 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
                  }]
        }
    

    It is working for me.

提交回复
热议问题