Location Symbol with custom LocationDataSource

300
5
10-21-2018 12:06 PM
Highlighted
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

Reply
0 Kudos
5 Replies
Highlighted
Esri Frequent Contributor

Make sure you set isLastKnown to false  

Location.IsLastKnown Property 

Highlighted
MVP Regular Contributor

Thanks.  Dang I wasted a lot of time on that

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

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

Reply
0 Kudos
Highlighted
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

Reply
0 Kudos
Highlighted
Esri Frequent 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 

Reply
0 Kudos