Location Symbol with custom LocationDataSource

961
5
10-21-2018 12:06 PM
JoeHershman
MVP Regular Contributor

Racking my brain on this an hoping someone has some insight.

I am using a custom LocationDataSource developed to use with specific GPS units.  When the custom LocationDataSource is attached to the MapView.LocationDisplay.DataSource the symbol is grey instead of the blue symbol that should be shown.  I cannot figure out why this is.  I have looked at the symbol definitions for the symbols on the LocationDisplay and they look the same in both cases.

       CustomLocationDataSource                    SystemLocationDataSource

I have gone so far as to reload the symbols after copying the ones defined by the LocationDisplay when it uses the SystemLocationDataSource, including loading the image stored in the API resources.  Nothing I do seems to get me the blue symbol. 

What am I missing?

Thanks

-Joe

Thanks,
-Joe
0 Kudos
5 Replies
dotMorten_esri
Esri Notable Contributor

Make sure you set isLastKnown to false  

Location.IsLastKnown Property 

JoeHershman
MVP Regular Contributor

Thanks.  Dang I wasted a lot of time on that

Thanks,
-Joe
0 Kudos
dotMorten_esri
Esri Notable Contributor

I'll see if we can't make that a little clearer.

0 Kudos
JoeHershman
MVP Regular Contributor

A different question related to custom LocationDataSource.  I have a DataSource that receives data from a Bluetooth source.  It all seems to work as expected except for one critical aspect, when UpdateLocation is called it does not seem to actually fire LocationChanged.  I have other DataSources which work in basically the same manner and the event is being fired as expected, however, in this one case nothing happens the event handler never receives anything and you never see the location on the map

Any thoughts?

Thanks

-Joe

Thanks,
-Joe
0 Kudos
dotMorten_esri
Esri Notable Contributor

Hard to say without a reproducer. Here's on example of a datasource provider that's been working good for me:

NmeaParser/NmeaProvider.cs at ArcGISLocationProvider · dotMorten/NmeaParser · GitHub 

0 Kudos