Reputation: 3805
I've got a marker with info window. How can I remove that green finger from the map? Look at this:
My code:
Marker startMarker = new Marker(mapView);
startMarker.setPosition(gPt);
startMarker.setIcon(null);//doesn't help
startMarker.setAnchor(Marker.ANCHOR_CENTER, 1.0f);
InfoWindow infoWindow = new MyInfoWindow(R.layout.bonuspack_bubble,
mapView, company);
startMarker.setInfoWindow(infoWindow);
startMarker.setTitle(company.getName());
startMarker.showInfoWindow();
mapView.getOverlays().add(startMarker);
Upvotes: 2
Views: 1371
Reputation: 3450
Understanding you want to show the infowindow, but without any marker icon: replace the default "green finger" marker by a small transparent icon.
Transparent so that the user see nothing.
startMarker.setIcon(mySmallTransparentIcon);
Upvotes: 2
Reputation: 13358
Try this code
mapView.getOverlays().remove(startMarker);
mapView.invalidate();
Upvotes: 2