I followed the tutorial entitled "Load a Webmap and Display Device Location" and I was successful. Now that I was able to display the device's location, I wanted to get/extract its coordinates and store it in a feature service. I have tried numerous examples on here and even resorted to trying to customize the add/ delete features template however I was unsuccessful. Instead of the Display Device Location, I also tried older examples such as position display point (mapPoint) where I modified the code a bit to use location display etc and it still did not work. I used another example from on here (Add a feature in a feature service-I had to modify the code as well) and I got a basemap to show up and a button (alone) however when the button was clicked, nothing happened.
What can I do? How can I obtain the coordinates from the device's current location and how can I store these coordinates? Thank you.