disable clickable landmark on google map

后端 未结 6 655
粉色の甜心
粉色の甜心 2020-12-03 06:56

I\'m using google map API v3. I want to disable click action on default google landmark/poi. For example, when I zoom to UCLA, the school icon shows up (that\'s fine) but I

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-03 07:27

    Google has exposed an option for this. See clickableIcons of google.maps.MapOptions in the docs.

    Example initialization code:

    map = new google.maps.Map(document.getElementById('map'), {
        clickableIcons: false
    });
    

提交回复
热议问题