Locate widget with useTracking option true

6376
11
Jump to solution
05-19-2016 10:47 AM
BhavinSanghani
Occasional Contributor II

Has anyone tried Locate widget with useTracking: true option?

I want to see the symbol is moving on the map when someone is moving around. How can we test this scenario of location monitoring?

0 Kudos
1 Solution

Accepted Solutions
BjornSvensson
Esri Regular Contributor

If you want to test in other browsers, or without the chrome emulator, you can use a third party library like in this JSAPI 4.0 sample:

Track coordinate locations | ArcGIS API for JavaScript 4.0

View solution in original post

11 Replies
RickeyFight
MVP Regular Contributor

Yes,

I have used used Tracking: true.

This is helpful when using routing. That way a user can follow themselves.

If I am understanding you right you want to track someone location from another lcoation?

Without doing a lot of set up you can use esri workforce (beta)

Workforce for ArcGIS 

0 Kudos
BhavinSanghani
Occasional Contributor II

Yes, that is correct! I want to show position on the map when person is travelling from one location to another location and see if the symbol is moving as well.

I understand that this is handled automatically with tracking: true option. But how can we test? I have noticed sometimes scale issues like map extent is setup very low (around 100 scale).

Did you use any emulator? I tried in Google Chrome emulator where we can emulate longitude/latitude. But can't emulate tracking.

0 Kudos
BhavinSanghani
Occasional Contributor II

BTW, thanks for sharing Workforce for ArcGIS solution. I implement tracking functionality in our product. So, I guess integration may not work with this product.

0 Kudos
RickeyFight
MVP Regular Contributor

The easiest solution would be to have someone walk across the street or around the building and see if the point moves.

I have not used an emulator before because I have not needed too.

0 Kudos
BhavinSanghani
Occasional Contributor II

Sure, I understand that. There are few scenarios to verify so, I want somewhat easy way to verify and debug.

0 Kudos
KellyHutchins
Esri Frequent Contributor

The emulate geolocation coordinates in the Chrome Dev Tools work for me. Just used them to test the Locate Widget with tracking enabled.

Screen Shot 2016-05-19 at 5.08.18 PM.png

Details on the dev tools sensor options: Device Mode Mobile Emulation - Google Chrome

0 Kudos
BhavinSanghani
Occasional Contributor II

Hi Kelly,

Once I enable tracking with emulated geolocation coordinates then the Location widget finds the position as per input. No issues in that. But how to emulate the scenario of moving? Consider as if I am moving in my car from one location to another location and with tracking enabled. I should see the symbol on map also moving. How can I test this scenario from my desktop?

0 Kudos
KellyHutchins
Esri Frequent Contributor

When I need to test moving I just modify the values in the emulator. When you do so you should see the point move to the new location.

BhavinSanghani
Occasional Contributor II

Yes, I did the same way. I think, browsers need to provide extra parameters speed and direction in emulator. That would be good test with real time scenario.

Thanks for your help.

0 Kudos