SPMapViewConfig

@interface SPMapViewConfig : NSObject

Class used configure SPMapView

  • Deprecated

    ‘requireAccessibility’ is deprecated. Renamed to ‘useAccessibleNavigation’

    Deprecated. Use the property ‘useAccessibleNavigation’ instead.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL requireAccessibility;

    Swift

    var requireAccessibility: Bool { get set }
  • If this is enabled, the map navigation will attempt to use wheelchair accessible paths when calculating a route. Wheelchair accessible paths will avoid stairs and escalators if possible.

    By default NO

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL useAccessibleNavigation;

    Swift

    var useAccessibleNavigation: Bool { get set }
  • Camera modes that are toggled between when clicking the camera button.

    Default modes are: Free, Follow and FollowWithHeading.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) SPMapViewCameraModes cameraModes;

    Swift

    var cameraModes: SPMapViewCameraModes { get set }
  • This defines the distance that the user has to be from the navigation destination to trigger the SPMapViewDelegate method ‘mapView:didNavigateToLocation:’. Different types of buildings may require you to change this value to achieve the optimal user experience.

    Here’s some values you may want to try out.

    Office/Hospital/Hotel/Supermarket/Apartment Building/University: 2.0 - 5.0 (meters)

    Airport/Train Station/Bus Station/Convention Center/Warehouse/Hangar/Amusement Park: 5.0 - 15.0 (meters)

    Default value: 5.0 (meters)

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat navigationDestinationThreshold;

    Swift

    var navigationDestinationThreshold: CGFloat { get set }
  • This defines the distance from the navigation path user has to be to trigger the SPMapViewDelegate method ‘mapView:willRecalculateRouteFrom:’. Different types of buildings may require you to change this value to achieve the optimal user experience.

    Here’s some values you may want to try out.

    Office/Hospital/Hotel/Supermarket/Apartment Building/University: 5.0 - 10.0 (meters)

    Airport/Train Station/Bus Station/Convention Center/Warehouse/Hangar/Amusement Park: 10.0 - 15.0 (meters)

    Default value: 10.0 (meters)

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        CGFloat navigationRecalculationThreshold;

    Swift

    var navigationRecalculationThreshold: CGFloat { get set }
  • This determines the duration (seconds) that user’s location will be displayed on the map before it will be hidden and SPMapView will call the delegate method ‘mapView:didFailToLocateUserWithError:’. See enum ‘SPMapViewErrorCode’ for possible Steerpath specific error codes.

    Every time a new location is provided to SPMapView via ‘setCurrentLocation:’, the ‘locationTimeout’ is reset.

    By default set to 300 seconds.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSTimeInterval locationTimeout;

    Swift

    var locationTimeout: TimeInterval { get set }
  • This determines the maximum radius for the user’s blue dot in meters. You can use this to limit the blue dot size.

    By default 15 meters.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat locationMaxRadius;

    Swift

    var locationMaxRadius: CGFloat { get set }
  • If this setting is enabled, the radius of the blue dot will start increasing after a while if no new locations are provided to the SPMapView via ‘setCurrentLocation:’ API.

    If you disable this, the blue dot radius will remain the same until the last location timeouts. See ‘locationTimeout’ property for explanation about timeouts.

    By default enabled.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL automaticAccuracyDeterioration;

    Swift

    var automaticAccuracyDeterioration: Bool { get set }
  • If enabled, the map view will automatically switch the currently visible floor to match the blue dot location.

    Enabled by default.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL automaticFloorSwitching;

    Swift

    var automaticFloorSwitching: Bool { get set }
  • If enabled, the map view will display a floor switch / selection widget on the screen when viewing a building that has multiple floors. Map zoom level must be > 15 for floor switch to appear.

    Enabled by default.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL showsFloorSwitch;

    Swift

    var showsFloorSwitch: Bool { get set }
  • If enabled the map view will display a navigation button on the screen. The button can be used to center camera on the blue dot.

    Enabled by default.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL showsNavigationButton;

    Swift

    var showsNavigationButton: Bool { get set }
  • If enabled the map view will display a navigation bar on the bottom of the screen when navigating.

    Enabled by default.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL showsNavigationBar;

    Swift

    var showsNavigationBar: Bool { get set }
  • If enabled the map view can display an info view on the bottom of the screen via the ‘showLocationInfo:’ method

    Disabled by default.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL showsLocationInfoBar;

    Swift

    var showsLocationInfoBar: Bool { get set }
  • If enabled the map will display a search bar in the top of the map. It can be used to search for points of interest. The map will additionally display search results and common categories for places.

    Disabled by default.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL showsSearch;

    Swift

    var showsSearch: Bool { get set }
  • Change the bottom insets for UI widgets such as the camera button and floor switch. Does not affect navigation bar, which will always be on the bottom.

    By default 120.0

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat bottomInset;

    Swift

    var bottomInset: CGFloat { get set }
  • Change the top insets for UI widgets such as the camera button and floor switch. Does not affect navigation bar, which will always be on the bottom.

    By default 60.0

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat topInset;

    Swift

    var topInset: CGFloat { get set }
  • Allows changing the scale/size of SPAnnotationView objects

    Scale 1.0 by default.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat annotationViewScale;

    Swift

    var annotationViewScale: CGFloat { get set }
  • Deprecated

    ‘cameraButtonIconColor’ is deprecated. Use ‘textColor’ and ‘primaryColor’ to customize UI element colors

    Deprecated. Will be removed in a future release.

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor* cameraButtonIconColor

    Swift

    var cameraButtonIconColor: UnsafeMutablePointer<Int32> { get set }
  • Deprecated

    ‘cameraButtonBackgroundColor’ is deprecated. Use ‘textColor’ and ‘primaryColor’ to customize UI element colors

    Camera button background color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor* cameraButtonBackgroundColor

    Swift

    var cameraButtonBackgroundColor: UnsafeMutablePointer<Int32> { get set }
  • Deprecated

    ‘floorSwitchTextColor’ is deprecated. Use ‘textColor’ and ‘primaryColor’ to customize UI element colors

    Floor switch text color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor* floorSwitchTextColor

    Swift

    var floorSwitchTextColor: UnsafeMutablePointer<Int32> { get set }
  • Deprecated

    ‘floorSwitchHighlightColor’ is deprecated. Use ‘textColor’ and ‘primaryColor’ to customize UI element colors

    Floor switch selection highlight color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor* floorSwitchHighlightColor

    Swift

    var floorSwitchHighlightColor: UnsafeMutablePointer<Int32> { get set }
  • Deprecated

    ‘floorSwitchBackgroundColor’ is deprecated. Use ‘textColor’ and ‘primaryColor’ to customize UI element colors

    Floor switch background color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor* floorSwitchBackgroundColor

    Swift

    var floorSwitchBackgroundColor: UnsafeMutablePointer<Int32> { get set }
  • Deprecated

    ‘navigationBarBackgroundColor’ is deprecated. Use ‘textColor’ and ‘primaryColor’ to customize UI element colors

    Navigation bar background color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor* navigationBarBackgroundColor

    Swift

    var navigationBarBackgroundColor: UnsafeMutablePointer<Int32> { get set }
  • Deprecated

    ‘navigationBarTextColor’ is deprecated. Use ‘textColor’ and ‘primaryColor’ to customize UI element colors

    Navigation bar text and icon colors

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor* navigationBarTextColor

    Swift

    var navigationBarTextColor: UnsafeMutablePointer<Int32> { get set }
  • Color for text labels in the UI elements provided by the map.

    Declaration

    Objective-C

    @property (nonnull, nonatomic, strong) UIColor* textColor

    Swift

    var textColor: UnsafeMutablePointer<Int32> { get set }
  • Primary color used in buttons, icons etc.

    Declaration

    Objective-C

    @property (nonnull, nonatomic, strong) UIColor* primaryColor

    Swift

    var primaryColor: UnsafeMutablePointer<Int32> { get set }
  • Additional navigation overview camera insets. Increasing the insets will add more empty space to the edges of the screen when the map is displaying an overview of a navigation route.

    By default (48, 48, 48, 48).

    In addition to these insets there’s a small default inset for each side added internally by the SDK that cannot be overridden.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) int navigationOverviewInsets;

    Swift

    var navigationOverviewInsets: Int32 { get set }