Reputation: 31
Does Here map iOS sdk provides Highway direction?
Example: While driving on US Highways/Interstate, Here map is providing information like I-5 or WA-14.
Can we get which highway/interstate direction we are heading into. Like I-5 N or WA-14 S.
Upvotes: 1
Views: 175
Reputation: 144
You can allways use course infromation taken from currentPosition(NMAGeoPositon object) of the NMAPositionManager.
Swift
NMAPositionManager.sharedInstance().currentPosition?.course
or Objective-C
[NMAPositionManager sharedPositioningManager].currentPosition.course
Valid course values are in the range [0, 360), with 0 degrees representing north and values increasing clockwise. Thus, east is 90 degrees, south is 180 degrees, and so on. Will be NMAGeoPositionUnknownValue if unknown.
Also it can be obtained from waypoint course.
calculatedRoute.waypoints[idx].course;
or aliases 'start', 'destination' can be used
calculatedRoute.start.course;
calculatedRoute.destination.course;
Another one is to use mapOrientation of maneuver
calculatedRoute.maneuvers[idx].mapOrientation
The angle (from north) at the start of the maneuver, in degrees. Zero represents true-north, with increasing values representing a clockwise progression of map orientation.
Upvotes: 1