Disable onMarkerClickListener completely in Maps API v2

后端 未结 6 1375
无人及你
无人及你 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:26

    Just override the onclick event:

    map.setOnMarkerClickListener(new OnMarkerClickListener() {
        public boolean onMarkerClick(Marker arg0) {
            return true;
        }
    });
    

提交回复
热议问题