Disable onMarkerClickListener completely in Maps API v2 Disable onMarkerClickListener completely in Maps API v2 android android

Disable onMarkerClickListener completely in Maps API v2


Just override the onclick event:

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


i have two suggestions:

if i understood right, you want to offer the functionality to place a marker on the map, right?! If you cannot remove the setOnMarkerClickListener, did you tried to draw at the map and "convert" your drawing to a Marker in the end. (get 'LatLng' from drawing and create a Marker).

actually the second suggestion isn't really a good one (depending if you can zoom/move your map). I had a similar task and we used an transparent overlay over the map, which handled all user input and delegates it. but we didn`t had the functionality of zoom and move, which would be pain in the ass...


map.setOnMarkerClickListener(null); try this