Select to view content in your preferred language

How can we move pin/marker in Arcgis?

4313
1
Jump to solution
02-18-2016 03:11 AM
Hemant_SinghRathore
Deactivated User

in one of my application I need to move marker on drag and drop, once user drop the pin I need to get the dropped pin location.

This is very basic feature of map but I am surprised that there is no such option in the library.

In native map there is property called "Draggable", is there any equivalent property in the Arcgis ?

0 Kudos
1 Solution

Accepted Solutions
GagandeepSingh
Frequent Contributor

You will have to implement the method mapView:didMoveTapAndHoldAtPoint:mapPoint:features: on AGSMapViewTouchDelegate. The delegate method gets called every time the user moves his finger while taping and holding the map view. The method also provides the array of features at that location. So in the method you can update the geometry of the features to the new mapPoint.

You can use this sample as a reference. The sample adds a marker if you tap and hold and changes the location of that marker when you move while taping and holding.

View solution in original post

1 Reply
GagandeepSingh
Frequent Contributor

You will have to implement the method mapView:didMoveTapAndHoldAtPoint:mapPoint:features: on AGSMapViewTouchDelegate. The delegate method gets called every time the user moves his finger while taping and holding the map view. The method also provides the array of features at that location. So in the method you can update the geometry of the features to the new mapPoint.

You can use this sample as a reference. The sample adds a marker if you tap and hold and changes the location of that marker when you move while taping and holding.