Select to view content in your preferred language

Get the path covered by user and display current location

823
4
Jump to solution
08-17-2020 03:03 AM
rsharma
Frequent Contributor

Hi ,

I am trying to get path covered by user to display it  using polyline. I m already displaying current location. But don't know how to get path it covered , 

As their is no starting point and no end point for route. End point is the current location just like the navigate route.

But i can't use navigate route. as it demands for start point etc.

Query: When user enters my property Boundary, from that moment I want to track and get the location of users showing current location

Any idea or example will be helpful

//This is how i am displaying current location
mapView.locationDisplay.autoPanMode = Enums.LocationDisplayAutoPanModeCompassNavigation;
mapView.locationDisplay.start();
0 Kudos
1 Solution

Accepted Solutions
LukeSmallwood
Esri Contributor

Hi rajni sharma‌,

This Show location history sample is doing the kind of workflow you describe. Note that this code targets our upcoming 100.9 release so some of it may not be available in your current version - but the essential idea is to use a PolylineBuilder which you add a point to every time a new location is received. Then you use the result of that builder (e.g. a Polyline) to create or update the geometry for a Graphic

Hope that helps,

Luke

View solution in original post

4 Replies
LukeSmallwood
Esri Contributor

Hi rajni sharma‌,

This Show location history sample is doing the kind of workflow you describe. Note that this code targets our upcoming 100.9 release so some of it may not be available in your current version - but the essential idea is to use a PolylineBuilder which you add a point to every time a new location is received. Then you use the result of that builder (e.g. a Polyline) to create or update the geometry for a Graphic

Hope that helps,

Luke

rsharma
Frequent Contributor

When is 100.9 is going to release as i got the problem to use and test it for my app . Is their any otherway meanwhile

0 Kudos
JamesBallard1
Esri Regular Contributor

Hi rajni sharma‌.

We are targeting having 100.9 released by the end of the August 2020. That is our current target, but I cannot guarantee it. We're working hard to make sure it happens.

rsharma
Frequent Contributor

Well the example is working with 100.8 also

0 Kudos