Issue
I created an MapView with 2 different Overlays. One Overlay shows the POIs on the map and the second shows a "bubble" when you click / tab one of the POIs.
Now I want to remove the second overlay when it is visible and no POI is tapped! I only need to know how to check if I click only the map or one of the POIs??? (also the bubble can be clicked).
Solution
In your code, when defining your
public class MyItemizedOverlay extends ItemizedOverlay<MyObject>
you can override
@Override
protected boolean onTap(final int index) {
// Called when you tap on an overlay
return true;
}
@Override
public boolean onTap(GeoPoint p, MapView mapView) {
// Called when you tap somewhere with no overlay
// So remove the second overlay here
}
Answered By - Zoleas
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.