Google Maps Api v3, custom Cluster icon

后端 未结 4 656
-上瘾入骨i
-上瘾入骨i 2020-12-13 00:48

how can i change cluster icon? i wolud like to have same icon, with some other color than blue.

4条回答
  •  时光取名叫无心
    2020-12-13 01:02

    Google changed his repo. Latest cluster repo is: https://github.com/googlemaps/js-marker-clusterer images : https://github.com/googlemaps/js-marker-clusterer/tree/gh-pages/images

    You may also consider downloading source and give link from your local path. This way you will have more control of resources your application needs.

    local_path "/pucblic/"
    mcOptions = {styles: [{
    height: 53,
    url: local_path+"m1.png",
    width: 53
    },
    {
    height: 56,
    url: local_path+"m2.png",
    width: 56
    },
    {
    height: 66,
    url: local_path+"m3.png",
    width: 66
    },
    {
    height: 78,
    url: local_path+"m4.png",
    width: 78
    },
    {
    height: 90,
    url:  local_path+"m5.png",
    width: 90
    }]}
    

提交回复
热议问题