I am using a map. I found an issue. How do i know which marker is clicked?
@Override
public boolean onMapObjectsSelected(List
To obtain which marker is clicked do like below in onMapObjectsSelected
method.
for (ViewObject viewObject : list) {
if (viewObject.getBaseType() == ViewObject.Type.USER_OBJECT) {
MapObject mapObject = (MapObject) viewObject;
if (mapObject.getType() == MapObject.Type.MARKER) {
MapMarker window_marker = ((MapMarker) mapObject);
System.out.println("Title is................."+window_marker.getTitle());
return false;
}
}
}
You have to find out which object type is selected in loop as above.