How to show Device Location using ArcGIS SDK in Java

698
2
Jump to solution
10-18-2019 12:15 AM
FuzailSiddiqui
New Contributor III

I am working on JavaFX desktop application that uses the ArcGIS SDK v100.6.0. I've observed that the ArcGIS SDK for .NET provides Location related classes (like Location and LocationDataSource) which can be used to handle device location data. However, i couldn't find any location related classes in the ArcGIS Java SDK. i want to show a device's location on the MapView. Can someone please provide a reference or code to accomplish that in java. Also, please state what classes are there for handling location data like position, accuracy, course, velocity, lat, long etc as we have in .NET SDK.  The official ArcGIS Java 100.6.0 documentation (Show the device's location—ArcGIS Runtime SDK for Java | ArcGIS for Developers ) isn't much helpful.

1 Solution

Accepted Solutions
CAMPSP
by
New Contributor

Android provides those classes too, but I found everything regarding java and updating a marker or graphic was last updated in 2017. Searching for "device location" in the the documentation returns 0 results. They don't seem to keep up with their SDK's updated very well. The closest I found was related to this: Update Graphics | ArcGIS for Developers - however, the only way to get it to work was to get and store the location yourself, then make a new marker, delete the old one, then redraw the new one.

View solution in original post

2 Replies
CAMPSP
by
New Contributor

Android provides those classes too, but I found everything regarding java and updating a marker or graphic was last updated in 2017. Searching for "device location" in the the documentation returns 0 results. They don't seem to keep up with their SDK's updated very well. The closest I found was related to this: Update Graphics | ArcGIS for Developers - however, the only way to get it to work was to get and store the location yourself, then make a new marker, delete the old one, then redraw the new one.

FuzailSiddiqui
New Contributor III

I am exactly doing the same brother. Created my own customized class for location details and when my static object gets updated i fire a property change event which then redraws my marker symbol. I hope they provide further support in Java SDK soon. 

0 Kudos