NavigationMapView

open class NavigationMapView: MGLMapView, UIGestureRecognizerDelegate

NavigationMapView is a subclass of MGLMapView with convenience functions for adding Route lines to a map.

  • Returns the altitude that the map camera initally defaults to.

    Declaration

    Swift

    @objc public static let defaultAltitude: CLLocationDistance = 1000.0
  • Returns the altitude the map conditionally zooms out to when user is on a motorway, and the maneuver length is sufficently long.

    Declaration

    Swift

    @objc public static let zoomedOutMotorwayAltitude: CLLocationDistance = 2000.0
  • Returns the threshold for what the map considers a long-enough maneuver distance to trigger a zoom-out when the user enters a motorway.

    Declaration

    Swift

    @objc public static let longManeuverDistance: CLLocationDistance = 1000.0
  • Maximum distnace the user can tap for a selection to be valid when selecting an alternate route.

    Declaration

    Swift

    @objc public var tapGestureDistanceThreshold: CGFloat = 50
  • A UIView used to indicate the user’s location and course on the map.

    If the view conforms to UserCourseView, its UserCourseView.update(location:pitch:direction:animated:) method is frequently called to ensure that its visual appearance matches the map’s camera.

    Declaration

    Swift

    @objc public var userCourseView: UIView?