PDA

View Full Version : Rotation of the map view based on direction traveling



nuudles
29.02.2016, 19:42
We're trying to get the SKMapView to rotate not based on the device's compass, but based on the actual direction that the user has been traveling in. I thought that could be accomplished using the SKHeadingModeHistoricPositions headingMode based on the name of it, but that didn't seem to help us. Is there something we're missing?

Adela_Silvia
01.03.2016, 13:53
The library gives 5 options to set the heading: SKHeadingModeNone, SKHeadingModeRotatingHeading, SKHeadingModeHistoricPositions, SKHeadingModeRotatingMap, SKHeadingModeRoute

nuudles
01.03.2016, 16:49
The library gives 5 options to set the heading: SKHeadingModeNone, SKHeadingModeRotatingHeading, SKHeadingModeHistoricPositions, SKHeadingModeRotatingMap, SKHeadingModeRoute

Thanks for the information, however, I've found little documentation as to what each of the heading modes mean. Could you provide insight into that?

Adela_Silvia
18.03.2016, 16:43
A few more details:
SKHeadingModeNone - hides the heading cone and the map does not take into account the the device heading when rendering.
SKHeadingModeRotatingHeading - shows the heading cone, the map does not rotate but the cone will rotate around the current position to indicate the device heading.
SKHeadingModeHistoricPositions - shows the heading cone, the map does not rotate but the cone will indicate the direction the user is going (it basically uses the last few locations to see where the user is heading)
SKHeadingModeRotatingMap - shows the heading cone always oriented to the upper part of the device, but the map will rotate according to the device’s heading
SKHeadingModeRoute - this mode is only useful when you navigate on the route. it orients the heading according to the direction you should go to advance on the route.