I am using ArcGIS API for JavaScript 4.10 and I want to implement a dragging of map view that will have a location pin (point graphic) in the center of the view. I have handled "drag" event of the view and used lat/long coordinates in view.extent.center like this :
view.on("drag", function(evt) {
var locationGraphic = getCurrentLocationGraphics();
view.graphics.removeMany(locationGraphic);
view.graphics.add(new Graphic(new Point([view.extent.center.longitude,view.extent.center.latitude]), selectedLocation));
});
However, I can't handle setting of these coordinates when the dragging of the view ends. I want to set some values and trigger functions when dragging stops. How can I accomplish this?