Disable onMarkerClickListener completely in Maps API v2

后端 未结 6 1374
无人及你
无人及你 2021-02-07 08:30

I want to disable clicking/tapping on map markers. I know you can disable default behavior by setting up an empty map.setOnMarkerClickListener

6条回答
  •  情歌与酒
    2021-02-07 09:10

    Apply OnMarkerClickListenerto your map. Implement onMarkerClick()method and returnfalse

    googleMap.setOnMarkerClickListener(new OnMarkerClickListener() {
        public boolean onMarkerClick(Marker marker) {
            return true;
        }
    });
    

提交回复
热议问题