Select to view content in your preferred language

Current location heading issues after update to 100.13

1143
7
02-16-2022 02:59 AM
o_pastukhov
New Contributor III

Device location's icon displays wrong heading in several cases after updating from 100.12 to 100.13.

In the attached test application the device is moving to the South all the time (with heading = 180). However, after switching to CompassNavigation from LocationDisplayAutoPanMode.Off the device icon is directed to the North even though the device is moving to the South. The same effect can be seen after switching from LocationDisplayAutoPanMode.CompassNavigation or ocationDisplayAutoPanMode.Navigation to LocationDisplayAutoPanMode.Off 

See the attached recording and sample app for details and reproducing the issue

Sample app for duplicating the issue .

 

7 Replies
dotMorten_esri
Esri Notable Contributor

Thank you for the simple reproducer. This makes it really easy to reproduce and understand the problem.

What you're seeing here is a difference between "heading" and "course". The arrow shows the course, the compass mode orients based on heading. In your sample you're never setting the Heading. You can add `UpdateHeading(course)` to also set the heading, but typically you'll do that based on a compass sensor.
I'm guessing what you're really looking to use is the Navigation pan mode, rather than compass mode. which will rotate the map based on your course.

dotMorten_esri_0-1645030923031.png

 



Heading: The direction you're (or rather the device) is facing.
Course: The direction you're moving in.

Think of looking out the side window of a car: You're heading to the side of the direction you're moving in. It's mostly used for figuring out "what am I looking at in 'that' direction", or dealing with cross-wind situations etc.

0 Kudos
MikeBingham
New Contributor II

I believe the real problem here is at the end of the video.  The term "heading" is mentioned in the problem above but I believe the term "course" should have been used.  In the sample heading is not being set so appears to be behaving correctly but course is not.  Course is being set when a new Location is created every 500 ms.  At the end of the video you can see that the course appears to be 0 by the direction of the arrow but it is set to 180 in the sample application.

0 Kudos
o_pastukhov
New Contributor III

Compare how the arrow behaves when going from LocationDisplayAutoPanMode.Navigation to LocationDisplayAutoPanMode.Off on 100.12. The arrow reflects the correct course value.

0 Kudos
o_pastukhov
New Contributor III

@dotMorten_esri have you had a chance to look at it more taking into account our clarifications and the recording from version 100.12?

0 Kudos
dotMorten_esri
Esri Notable Contributor

Sorry for not responding earlier and following up with me at devsummit. We've confirmed this regression and are tracking the issue internally. It looks like there's generally an issue with taking the current map rotation into account when not in navigation mode or compass mode.

dotMorten_esri
Esri Notable Contributor

Could you try and add this to your application and see if that resolves the issue for you?
var ms = MyMapView.LocationDisplay.CourseSymbol as Esri.ArcGISRuntime.Symbology.MarkerSymbol;
ms.AngleAlignment = Esri.ArcGISRuntime.Symbology.SymbolAngleAlignment.Map;

0 Kudos
o_pastukhov
New Contributor III

That didn't help.

0 Kudos