Android google maps marker disable navigation option

六眼飞鱼酱① 提交于 2019-11-29 20:33:07

This thing is called Map Toolbar. You can disable it by calling UiSettings.setMapToolbarEnabled(false):

GoogleMap map;
....... //init map

map.getUiSettings().setMapToolbarEnabled(false);

You can also define setMapToolbarEnabled() from the XML using the following property:

map:uiMapToolbar="false"

In kotlin you can do:

map.apply {
   uiSettings.isMapToolbarEnabled = false
}

If anyone needs to do this in Google Maps v2, you set it in the map options instead of setting it on the map directly. So like this:

var mapOptions = new GoogleMapOptions().InvokeMapToolbarEnabled(false);

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!