AGSLocationDisplayDataSourceDelegate ignoring heading updates

1279
4
Jump to solution
04-17-2013 11:14 AM
PatrickHartling
New Contributor III
I have a custom implementation of the AGSLocationDisplayDataSource protocol that is being used to provide location and heading updates from an external GPS service. Location updates generally work, although I have another forum post about when they do not. Heading updates do not work at all, though.

It is as though the AGSLocationDisplayDataSourceDelegate object assigned to my AGSLocationDisplayDataSource object just ignores that information and keeps the heading at north. I have the auto-pan mode set to AGSLocationDisplayAutoPanModeNavigation on the AGSLocationDisplay object and have tried using pinch rotation on the AGSMapView to determine if the heading works at all. I can rotate the map view a little, but it always reorients to north automatically.

Is there anything special that needs to be done to get the heading updates to be handled? Perhaps I am just supplying invalid heading values to the delegate. I have not seen anything so far in the documentation that indicates how the heading value is interpreted. My assumptions are these:


  • North is 0

  • The unit of measure is degrees

  • Values increase in clockwise order

Are any of these incorrect?
0 Kudos
1 Solution

Accepted Solutions
PatrickHartling
New Contributor III
It turned out that I overlooked the distinction between heading (direction the device is pointing) and course (direction of navigation). By setting the course property on the AGSLocation instance supplied to the location display data source delegate via -locationDisplayDataSource:didUpdateWithLocation:, things started working.

View solution in original post

0 Kudos
4 Replies
PatrickHartling
New Contributor III
It turned out that I overlooked the distinction between heading (direction the device is pointing) and course (direction of navigation). By setting the course property on the AGSLocation instance supplied to the location display data source delegate via -locationDisplayDataSource:didUpdateWithLocation:, things started working.
0 Kudos
ShiminCai
Occasional Contributor III

Hi Patrick,

How did you implement your custom location display datasource? I'm also looking for implementing a custom datasource to force my apps to use location feeds from external gps devices. Would it be possible to give me any advices on this or share any ideas and codes please?

Thanks,

Shimin

0 Kudos
PatrickHartling
New Contributor III

Hi Shimin,


I am afraid that I do not remember the details of this as it has been almost five years since I last used the ArcGIS SDK. I no longer have access to that source code in order to give you a high-level answer. My best recollection is making subclasses as necessary, and I think that SpatiaLite was involved in the custom data source. I do remember that I hadn't noticed the categories with names along the lines of SubclassOnly that provided "protected" (stealing the C++ term) access to methods and properties.

I am sorry that I cannot be more helpful.


Best regards,

Patrick

0 Kudos
ShiminCai
Occasional Contributor III

Hi Patrick,

Many thanks for your reply which at least gives me something to think and I'm sorry to bother you. That's totally ok as nobody would remember things in detail that happened five years ago. Thank you again.

 

Cheers,

Shimin

0 Kudos