.NET 100.1.0 LocationDisplay Does Not Update Symbol Heading

1266
4
Jump to solution
10-24-2017 09:47 AM
LukeGuirguis
New Contributor II

I am currently using ESRI .NET WPF SDK v100.1.0.
I created a class that inherits from LocationDataSource, and within it I am using the inherited methods UpdateLocation() and UpdateHeading().

I set the LocationDisplay's DataSource to an instance of this class.
UpdateLocation() works and I can see my symbol on the map at the correct location. 

However, UpdateHeading() doesn't seem to be updating the symbol and it is always facing North.

Please help. Thanks!
  

0 Kudos
1 Solution

Accepted Solutions
LukeGuirguis
New Contributor II

I figured it out. In my call to UpdateLocation(), I was setting IsLastKnown to true inside the Location object. Changing it to false, and setting the Location.Course  to the heading now updates the symbol rotation. I only need to call UpdateLocation() now.

View solution in original post

4 Replies
NagmaYasmin
Occasional Contributor III

Hi Luke,

I believe you need to turn on the auto pan mode to update the symbol for UpdateHeading() method. This symbol is only used in compass navigation auto pan mode.

Have you already tried this?

MyMapView.LocationDisplay.AutoPanMode = LocationDisplayAutoPanMode.CompassNavigation;  // changed to CompassNavigation mode

Hope that helps,

 

LukeGuirguis
New Contributor II

Thank you for your reply. I just tried it now with:
MapView.LocationDisplay.AutoPanMode = LocationDisplayAutoPanMode.CompassNavigation;

The map now rotates, keeping the symbol fixed. I would like to keep the map fixed and have the symbol rotate.
I was able to accomplish this in v10.2. I am trying to migrate my project to v100.1.0.
Any ideas?

Thanks.

0 Kudos
LukeGuirguis
New Contributor II

I tried to update the symbol directly (PictureMarkerSymbol) by recreating the symbol with a different angle, however this method is too costly and really slows down the application.
It seems I am out of options for now.

0 Kudos
LukeGuirguis
New Contributor II

I figured it out. In my call to UpdateLocation(), I was setting IsLastKnown to true inside the Location object. Changing it to false, and setting the Location.Course  to the heading now updates the symbol rotation. I only need to call UpdateLocation() now.