TomTomSDKMapDisplay

CameraEvent

NKTCameraOperatorDelegate

  • Declaration

    Swift

    extension MichiCameraClient: NKTCameraOperatorDelegate

CameraActions

  • A protocol that defines camera actions.

    See more

    Declaration

    Swift

    public protocol CameraActions

CameraOperatorRoadClass

  • Indicates the class of a road classified by speed limit.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public enum CameraOperatorRoadClass

ControlPoint

  • The camera configuration for a given distance to the next instruction on the route. Intermediate values are obtained by linear interpolation between the corresponding points.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct ControlPoint
    extension ControlPoint: Equatable

FollowCameraOperatorConfig

  • Storage configration for follow camera operator.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct FollowCameraOperatorConfig
    extension FollowCameraOperatorConfig: Equatable

CameraProperties

  • A type that represents CameraProperties: position, zoom, tilt and rotation

    See more

    Declaration

    Swift

    public struct CameraProperties
  • A type that represents camera tracking modes.

    See more

    Declaration

    Swift

    public enum CameraTrackingMode : Equatable

CameraUpdate

  • The CameraUpdate class specifies the map view’s camera position, zoom, tilt, rotation and more.

    There are two ways to set a camera update:

    • Call TomTomMap.applyCamera(_:, animationDuration:, completion:) or TomTomMap.moveCamera(_:) which sets the camera update with a corresponding animation for the former or no animation for the latter.

    • Set it directly through the MapView, i.e.: mapView.cameraUpdate = CameraUpdate(position: .AMSTERDAM, zoom: 11).

    Each method has its limitations:

    • When calling applyCamera(_:, animationDuration:, completion:) and moveCamera(_:) through the TomTomMap, there are certain CameraUpate properties that can and cannot be used in conjunction with others:

    init(position:zoom:tilt:rotation:positionMarkerVerticalOffset:scale:fieldOfView:):

    • zoom - cannot be used together with scale.
    • scale - cannot be used together with zoom.

    init(zoomBy:zoomIn:zoomOut:tiltBy:rotateBy:moveBy:fieldOfViewChangeBy:):

    • zoomBy - cannot be used together with zoomIn or zoomOut.
    • zoomIn- cannot be used together with zoomOut or zoomBy.
    • zoomOut- cannot be used together with zoomIn or zoomBy.
    • moveBy - cannot be used together with any of the other properties.

      • When setting directly the cameraUpdate field through the MapView, no animation is applied and only these specific properties can be set:
    • position.

    • zoom - cannot be used together with scale.

    • tilt.

    • rotation.

    • scale - cannot be used together with zoom.

    • fieldOfView.

    • moveBy - cannot be used together with any of the other properties.

    See more

    Declaration

    Swift

    public struct CameraUpdate : Equatable
  • A type that represents a set of coordinates and the padding around them.

    See more

    Declaration

    Swift

    public struct FitToCoordinatesOptions : Equatable
  • Defines map visible region as CLLocationCoordinate2D coordinates.

    See more

    Declaration

    Swift

    public struct VisibleRegion

GestureState

Equatable

  • Declaration

    Swift

    extension GestureMessage: Equatable

GestureType

  • An OptionSet that defines available gestures for ExclusiveGestureManager.

    See more

    Declaration

    Swift

    public struct GestureType : OptionSet, Hashable

UIGestureRecognizerDelegate

MapInteraction

  • Describes possible cases of MapInteractionEvent.

    See more

    Declaration

    Swift

    public enum MapInteraction
    extension MapInteraction: Event
  • Class to add a key for the map. The key must be injected before a MapView can be used.

    • Example: “” func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { MapsDisplayService.apiKey = “MAP_KEY” […] return true }
    - Important: This is a Public Preview API. It may be changed or removed at any time.
    
    See more

    Declaration

    Swift

    final public class MapsDisplayService

CopyrightsService

  • CopyrightsServiceProtocol defines a method used to obtain the copyright informations.

    See more

    Declaration

    Swift

    public protocol CopyrightsService

TomTomCopyrightsService

NKTPositionMarkerClickedDelegate

  • Declaration

    Swift

    extension MichiLocationClient: NKTPositionMarkerClickedDelegate

LocationIndicator

  • Types of the location marker visualization.

    See more

    Declaration

    Swift

    public enum LocationIndicator : Equatable

LocationActions

  • Type to control location features.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol LocationActions

LocationProviderObservable

OnlineCachePolicy

  • The cache which is being used while fetching map tiles.

    See more

    Declaration

    Swift

    public enum OnlineCachePolicy
    extension OnlineCachePolicy: Equatable
  • MapActions defines a set of methods closely connected to the map.

    See more

    Declaration

    Swift

    public protocol MapActions
  • MapGestureDisableOption An option set defining the map gestures to be disabled.

    See more

    Declaration

    Swift

    public enum MapGestureDisableOption
  • Allows the user to configure the initial parameters of the map.

    MapOptions is used in conjunction with MapViewinitialization, i.e: When creating a MapView, it is possible to pass a MapOptions object to configure the MapView before it is showing on the screen, for example, creating a MapView object with the default TomTom style, and a dark style mode: let mapOptions = MapOptions(mapStyle: .defaultStyle, apiKey: "your-key", styleMode: .dark) let mapView = MapView(mapOptions: mapOptions)

    Creating a MapView without passing a MapOptions object, will result in the MapView being created using the deafult values. In such case, the API Key that will be used for the map will be taken from MapsDisplayService.apiKey.

    See more

    Declaration

    Swift

    public class MapOptions : NSObject

OnDiskCachePolicy

  • The OnDiskCachePolicy sets rules for caching: time interval of storing the cache, maximum cache size, etc.

    See more

    Declaration

    Swift

    public enum OnDiskCachePolicy : Equatable

StyleContainer

  • Holder struct for main and dark version of the style definition. If darkStyle is not provided, setting TomTomMap.styleMode has no effect.

    See more

    Declaration

    Swift

    public struct StyleContainer
    extension StyleContainer: Equatable

StyleDefinition

  • The map style definition. For style file format see map style specification. Style Specification is a formal definition of all properties that define the map’s appearance.

    See more

    Declaration

    Swift

    public enum StyleDefinition
    extension StyleDefinition: Equatable

PositionMarkerSize

  • Defines size for chevron or pointer for particular zoom level.

    See more

    Declaration

    Swift

    public struct PositionMarkerSize
    extension PositionMarkerSize: Equatable
  • Defines the map styles available to the user.

    See more

    Declaration

    Swift

    public enum StyleMode

Layer

  • The Layer protocol that represents map layer.

    See more

    Declaration

    Swift

    public class Layer

LayerType

Metadata

  • The Metadata is used to carry extra information.

    See more

    Declaration

    Swift

    public struct Metadata

TilesDefinition

SourceCollection

Style

  • This class provides a container for tiles sources information and map layers.

    See more

    Declaration

    Swift

    public final class Style

Equatable

  • Declaration

    Swift

    extension StyleFetcherError: Equatable
    extension StyleFetcherError: LocalizedError

AnnotationOptions

  • Base protocol for AnnotationOptions

    Declaration

    Swift

    public protocol AnnotationOptions

Annotation

  • Base protocol for any Annotation: polygon, line, circle, marker etc.

    See more

    Declaration

    Swift

    public protocol Annotation

CircleOptions

Circle

Equatable

  • Declaration

    Swift

    extension GeoJSONMarkerOptions: Equatable
  • Scene level where the specified color should be used.

    Declaration

    Swift

    public typealias SceneLevel = Double
  • The offset of the line to be created.

    Declaration

    Swift

    public typealias OffsetUnits = Double
  • Dash length units.

    Declaration

    Swift

    public typealias DashLengthUnits = Double

LineCapPlacement

LineJoinType

LinePatternType

LineUnit

LinePatternRepeat

LineOutlineStyle

LineCapType

SceneColor

WidthScene

OutlineWidthScene

ReserveCoordinate

CoordinateAlongLine

  • Coordinate along line.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct CoordinateAlongLine : Equatable

LinePattern

PatternLengthScene

PatternBeginOffsetScene

Line

LineOptions

MarkerOptions

Marker

TextAnchoring

MarkerLabelOptions

InnerPolygonOptions

PolygonOverlay

  • A polygon overlay can be built by setting the outer area color and adding inner polygons. Only one inner polygon is supported, but the inner polygons can be nested. Example:

       let innerOptions = InnerPolygonOptions(fillColor: .red
                                          coordinates: coordinates)
    
       innerOptions.nestedPolygonOptions = InnerPolygonOptions(
           fillColor: UIColor.blue,
           coordinates: coordinates
       )
    
       let polygonOptions = PolygonOverlayOptions(outerColor: .green,
                                              innerPolygonOptions: innerOptions)
    
       try? mapView.map.addPolygonOverlay(options: polygonOptions)
    

    }

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public class PolygonOverlay : Annotation

PolygonOverlayOptions

TextureOptions

  • Type that represents texture options.

    See more

    Declaration

    Swift

    public struct TextureOptions : Equatable

PolygonOptions

  • Polygon options.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct PolygonOptions : AnnotationOptions, Equatable

Polygon

PolygonError

  • The PolygonError enum contains possible errors that can occurs during Polygon init.

    See more

    Declaration

    Swift

    public enum PolygonError : Error
    extension PolygonError: LocalizedError

AnnotationsActions

  • A protocol that defines map annotation actions.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol AnnotationsActions

AnnotationServiceError

  • Annotation service error.

    See more

    Declaration

    Swift

    public enum AnnotationServiceError : Error
    extension AnnotationServiceError: LocalizedError

RenderedFeature

  • RenderedFeature class

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public struct RenderedFeature
  • Rendered features query.

    See more

    Declaration

    Swift

    public struct RenderedFeatureQueryOptions

RenderedFeatureActions

  • Rendered Feature Actions protocol.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol RenderedFeatureActions

Route

  • A Route representation which can be added and displayed on the map.

    To show a Route on the map, call the TomTomMap.addRoute(RouteOptions) method. You can configure its shape and appearance with the RouteOptions class. Drawing a Route on the map requires a list with coordinates of the Route points.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public class Route

RouteDelegate

CoordinateBounds

RouteError

  • Enumeration of route errors.

    See more

    Declaration

    Swift

    public enum RouteError : LocalizedError
  • Protocol allowing management of the route representation on the map.

    See more

    Declaration

    Swift

    public protocol RouteActions
  • Route instruction.

    See more

    Declaration

    Swift

    public struct RouteInstruction

RouteOptions

  • Class that contains configuration of the route that will be drawn on the map.

    Example:

    let routeOption: RouteOptions = RouteOptions(coordinates: route.geometry)
    guard let mapRoute = try? self.mapView.map.addRoute(routeOption) else { return }
    
    See more

    Declaration

    Swift

    public struct RouteOptions

RouteSection

  • A model that represents a part of the road under some special conditions, i.e., a tunnel or a non-drivable road, with a respective range. This model describes these road segments, and then passes these segments to RouteOptions as part of the route’s configuration that is drawn on the map.

    See more

    Declaration

    Swift

    public struct RouteSection

MapInteractionObserver

TrafficIconCategory

TrafficMagnitude

TrafficIncident

  • Represents traffic incident details.

    See more

    Declaration

    Swift

    public struct TrafficIncident
  • Protocol that defines method that will be performed when user clicked on traffic incidents icon.

    See more

    Declaration

    Swift

    public protocol TrafficIncidentObserver : Observer
  • Defines available actions according to vehicle restriction feature.

    Important

    This is a Public Preview API. It may be changed or removed at any time.
    See more

    Declaration

    Swift

    public protocol VehicleActions

MapView

  • The MapView object to wrap the underlying map renderer.

    It contains the map created by the renderer in the view hierarchy and provides UI and view life-cycle functionalities. The view can be created programmatically, via xib or storyboards.

    For example, displaying a simple MapView programmatically using a constraints-based layout:

    Initialization:

    lazy var mapView: MapView = {
      let mapOptions = MapOptions(mapStyle: .defaultStyle, apiKey: "your-key")
      let mapView = MapView(mapOptions: mapOptions)
      return mapView
    }()
    

    Layout:

    mapView.translatesAutoresizingMaskIntoConstraints = false
    view.addSubview(mapView)
    NSLayoutConstraint.activate([
      mapView.widthAnchor.constraint(equalTo: view.widthAnchor),
      mapView.heightAnchor.constraint(equalTo: view.heightAnchor),
    ])
    

    Setting up the receival of life-cycle events and updates, as well as setting the initial zoom and position of the map view:

    mapView.delegate = self
    mapView.cameraUpdate = .init(position: .AMSTERDAM, zoom: 13)
    

    There will also be a need to conform your UIViewController to MapViewDelegate and implement the required methods.

    See more

    Declaration

    Swift

    @objc
    open class MapView : UIView

MapViewError

  • Enumeration of TomTomMap View errors.

    See more

    Declaration

    Swift

    public enum MapViewError : LocalizedError

MapRendererFrameCaptureDelegate

  • MapMetalRendererFrameCaptureDelegate exposes possibility to get currently drawn frame as a texture. Using this delegate may have impact of performance rendering.

    See more

    Declaration

    Swift

    public protocol MapRendererFrameCaptureDelegate : AnyObject

MapViewDelegate

  • The MapViewDelegate protocol defines a set of methods that can be implemented to receive events and updates related to the MapView life cycle.

    See more

    Declaration

    Swift

    public protocol MapViewDelegate : AnyObject

LocationProviderObservable

MapMetricsMonitorService

  • Declaration

    Swift

    extension AggregatingMapMetricsMonitorService: MapMetricsMonitorService
    extension AggregatingMapMetricsMonitorService: MapMetricsObserver
    extension AggregatingMapMetricsMonitorService: ContinuousMapMetricsMonitorService
  • Declaration

    Swift

    extension DefaultMapMetricsMonitorService: MapMetricsMonitorService
    extension DefaultMapMetricsMonitorService: MapMetricsObserver

MapDisplayDataProvider

MapDelegate

  • Methods for managing map interactions and events.

    See more

    Declaration

    Swift

    public protocol MapDelegate : AnyObject

MapDataSource

  • The methods that an object adopts to manage callout views for a MapView.

    See more

    Declaration

    Swift

    public protocol MapDataSource : AnyObject

TomTomMap

  • The TomTomMap class serves as the foundational class, acting as the primary gateway for integrating a multitude of map-related features. It offers a rich set of functionalities enabling developer interaction with the map and customizing its behavior.

    TomTomMap can be accessed in several ways through the MapView class:

    • Through the property mapView.map.
    • By calling mapView.getMapAsync, i.e., mapView.getMapAsync { map in // do something with map }
    • By assigning mapView.onMapReadyCallback, i.e., mapView.onMapReadyCallback = { map in // do something with map }
    • By defining mapView(_:, onMapReady:) through the MapDelegate, i.e., func mapView(_: MapView, onMapReady map: TomTomMap) { // do something with the map } In most cases, the preferred way to access the map would be through the property mapView.map, but in some cases where the map should be ready first, such as when calling showVehicleRestrictions(vehicle:) the preferred way would be mapView.getMapAsync or mapView.onMapReadyCallback.
    See more

    Declaration

    Swift

    public class TomTomMap : AnnotationsActions, RouteActions, MapActions
    extension TomTomMap: CameraActions
    extension TomTomMap: RenderedFeatureActions
    extension TomTomMap: VehicleActions, LocationActions