In the ArcGIS runtime SDK 100.0.0 for iOS there is a function called:
- (void)geoView:(AGSGeoView *)geoView didMoveLongPressToScreenPoint:(CGPoint)screenPoint mapPoint:(AGSPoint *)mapPoint
What is the Android equivalent?
arcgis runtime sdk 100.0.0 android runtime sdk 100.0.0
I think you would need to combine the onFling listener and the onLongPress listener to achieve the same effect in Android. Implement these separately with some unique combination so you know when the action is taken.
I hope this helps!
Ok but how would I call onFling from onLongPress?
Have a field that called isLongPress and have it as a type boolean. When you start the onFling, it would check to see if isLongPress is set to true and then do the expected behavior if it is true. When you then lift your finger, you would use onUp to reset isLongPress to false. Its a tricky workflow, but this is one way that comes to mind on how to achieve this.
Is there a way to drag a graphic around the map? I'm using the onFling method to update the geometry of a polyline, however when I try to drag the graphic it stays in place and the map just pans around. Can I disable map panning when I'm trying to update a graphic?
Are you calling the super.onFling method in your override?
And you may want to override onTouch rather than onFling, I may have misspoken the first time
Yes I was calling super.onFling in the method, but I haven't tried using onTouch.
I would not call the super method if you can help it. Also, based on some additional research, onTouch may be the better choice to stop the map from panning.
Retrieving data ...