I am using a map. I found an issue. How do i know which marker is clicked?
@Override
public boolean onMapObjectsSelected(List
MapGesture.OnGestureListener onGestureListenernew= new
MapGesture.OnGestureListener() {
@Override
public void onPanStart() {
}
@Override
public void onPanEnd() {
}
@Override
public void onMultiFingerManipulationStart() {
}
@Override
public void onMultiFingerManipulationEnd() {
}
@Override
public boolean onMapObjectsSelected(List list) {
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);
Log.d("danish","danish");
System.out.println("Title is................."+window_marker.getInfoBubbleHashCode());
Toast.makeText(m_activity,"Hello"+window_marker.getCoordinate(),Toast.LENGTH_LONG).show();
return false;
}
}
}
return false;
}
@Override
public boolean onTapEvent(PointF pointF) {
return false;
}
@Override
public boolean onDoubleTapEvent(PointF pointF) {
return false;
}
@Override
public void onPinchLocked() {
}
@Override
public boolean onPinchZoomEvent(float v, PointF pointF) {
return false;
}
@Override
public void onRotateLocked() {
}
@Override
public boolean onRotateEvent(float v) {
return false;
}
@Override
public boolean onTiltEvent(float v) {
return false;
}
@Override
public boolean onLongPressEvent(PointF pointF) {
return false;
}
@Override
public void onLongPressRelease() {
}
@Override
public boolean onTwoFingerTapEvent(PointF pointF) {
return false;
}
};
then add
m_mapFragment.getMapGesture().addOnGestureListener(onGestureListenernew);