LocationDisplay - Not Auto Panning

2686
4
Jump to solution
01-21-2016 12:28 PM
JimFiddes
Occasional Contributor

Afternoon (Antti )

I have made my custom LocationProvider created and am streaming data onto the map through the LocationDisplay. I love how the default symbol looks and it appears a heading arrow resides inside the circle (very cool!!). I do have a question about the LocationDisplay.AutoPanMode = AutoPanMode.Navigation / Default / Off. After reading documentation I see that the Navigation will change the map's heading as a feed comes in and has the point located dead center and about 2/3 down the map. I haven't field tested yet but I'm hoping the point will remain static and the map will move towards the point (similar to what we see in car navigation systems)?

The most immediate question I do have is when the AutoPanMode is set to either Nav or Default, I'm able to pan the map where the GPS is not visible; however the map never re-centers when the next gps event is fired. I would assume when the mode is set to anything but off, the point will remain within the map's extent?

A final question in regards to the autopan, when I developed our existing mobile solution in ArcGIS Engine, I needed to manage an invisible interior border (IEnvelope)so it could detect if the GPS point has gone outside the box and would call a re-center command. This interior border was used to help from keeping the GPS point from getting to close to the map edge ensuring the navigator could always keep seeing what was ahead of them. Does the Navigation mode handle keeping the GPS from getting to close to the map borders edge?

0 Kudos
1 Solution

Accepted Solutions
AnttiKajanus1
Occasional Contributor III

Hi Jim,

Have you ran 'Location Display' sample where you can see how modes are working? Basically when you are running LocationDisplay with Mode = Navigation, the device is staying in the same location all the time and map and it's rotation is set by the values you get from the location provider. That is what you can often see in navigators / 'driving mode'. You can start panning again but that will change the mode to Off. If you want to disable panning you can use MapView.NavigationOptions to define correct interaction model for the situation. Mode Navigation is designed so that you can always see your location in the map but if you start panning around, it means that the you are changing the mode. After panning around, you can reset the mode to navigation and the map pans to the correct location again.

I think that Navigation should work well for you.

If you use mode Default, you can pan around while the mode stays as default. If you need to customize the experience, you could use default mode and hook into the location changed / navigation completed events and move the map how you like.

View solution in original post

0 Kudos
4 Replies
AnttiKajanus1
Occasional Contributor III

Hi Jim,

Have you ran 'Location Display' sample where you can see how modes are working? Basically when you are running LocationDisplay with Mode = Navigation, the device is staying in the same location all the time and map and it's rotation is set by the values you get from the location provider. That is what you can often see in navigators / 'driving mode'. You can start panning again but that will change the mode to Off. If you want to disable panning you can use MapView.NavigationOptions to define correct interaction model for the situation. Mode Navigation is designed so that you can always see your location in the map but if you start panning around, it means that the you are changing the mode. After panning around, you can reset the mode to navigation and the map pans to the correct location again.

I think that Navigation should work well for you.

If you use mode Default, you can pan around while the mode stays as default. If you need to customize the experience, you could use default mode and hook into the location changed / navigation completed events and move the map how you like.

0 Kudos
JimFiddes
Occasional Contributor

Thanks again for the timely response. I will field test today and I missed the fact that when I panned the map myself that the navigation mode changed to off. Maybe we can update the documentation to reflect that if the map is panned the mode changes.... or I somehow missed reading that too.

0 Kudos
AnttiKajanus1
Occasional Contributor III

Thanks for the feedback.

It seems that it's mentioned in

https://developers.arcgis.com/net/desktop/api-reference//html/P_Esri_ArcGISRuntime_Location_Location... but it's not mentioned in the guide documentation https://developers.arcgis.com/net/desktop/guide/show-device-location.htm. I'll make a note to document the options better.

0 Kudos
JimFiddes
Occasional Contributor

Lol, nope this one is all one me for missing that.

Thanks again!

0 Kudos