I want to share/ send my location (Coordinates and place name) on longpress function. how i can i do ?
Extend the DefaultMapViewTouchListener (DefaultMapViewOnTouchListener| arcgis-android ) and then override the onLongPress(MotionEvent event) method to include the details in grabbing the location. Now depending on what location you are interested in grabbing, you can either call MapView.identifyLayersAsync to identify a layer on the map and send that to an ACTION_SEND intent or if you are interested in getting the physical x, y of the location (in terms of the projection used) you can use MapView.screenToLocation(point) and the point is the point you get from the OnLongPress listener motionevent. Then you can reverse geocode that point to get an address.
I hope this helps!
@Override public void onSingleTap(float x, float y) { unable to pass onSingleTap(MotionEvent point){
what should i do ???
i am using arcgis 10.2.9 android sdk.
Locking this thread as it is a duplicate
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.