Marker examples: add (map) long press events #32

This commit is contained in:
Emux
2016-11-22 20:37:05 +02:00
parent 1133edb83d
commit 16fa42d462
2 changed files with 41 additions and 5 deletions

View File

@@ -76,13 +76,19 @@ public class MarkerLayerTest extends GdxMapApp implements ItemizedLayer.OnItemGe
else
item.setMarker(null);
System.out.println(item.getTitle());
System.out.println("Tap " + item.getTitle());
return true;
}
@Override
public boolean onItemLongPress(int index, MarkerItem item) {
return false;
if (item.getMarker() == null)
item.setMarker(mFocusMarker);
else
item.setMarker(null);
System.out.println("Long press " + item.getTitle());
return true;
}
public static void main(String[] args) {