首页 文章

如何删除默认谷歌 Map 当前位置图标?

提问于
浏览
0

我正在使用 Ionic 2Typescript 创建混合应用程序 . 我添加了 cordova-plugin-googlemaps 插件并在我的页面中添加了MAP .

在查看加载时,我找到了用户位置并添加了标记 . 我的标记也成功添加 . 但默认 Map 当前位置图标(蓝点)也会自动添加 . 我想隐藏/删除它 .

任何人都可以告诉我们如何隐藏这个图标?

enter image description here

1 回答

  • 1

    将“ myLocationButton ”值设置为true时,将显示蓝点 . 删除它或将值设置为false .

    new GoogleMap('YOUR_MAP_ELEMENT', {
                    'backgroundColor': 'white',
                    'controls': {
                        'compass': true,
                        'myLocationButton': false,
                        'zoom': true
    }});
    

相关问题