Reputation: 1944
I cannot find a way to disable infowindowclick on an single icon. Is there a way to do this? I have a single icon that I create that marks my location. I then have many other markers, but this one that I have created for my location I would like to disable the infowindowclick on, however, I would like to leave it for the rest.
Is there an ID of a sort that will always be for my location icon that I can use in a if else or switch case?
Thanks
Upvotes: 1
Views: 57
Reputation: 24848
// try this way
@Override
public void onInfoWindowClick(Marker marker) {
LatLng isMyLatLng = marker.getPosition();
if(isMyLatLng.longitude== yourLongitude && isMyLatLng.latitude == yourLatitude ){
marker.hideInfoWindow();
}else{
// write your code here for show InfoWindow other point
}
}
Upvotes: 1