Structures

The following structures are available globally.

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

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

GestureType

  • An OptionSet that defines available gestures for ExclusiveGestureManager.

    See more

    Declaration

    Swift

    public struct GestureType : OptionSet, Hashable

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

PositionMarkerSize

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

    See more

    Declaration

    Swift

    public struct PositionMarkerSize
    extension PositionMarkerSize: Equatable

Metadata

  • The Metadata is used to carry extra information.

    See more

    Declaration

    Swift

    public struct Metadata

TilesDefinition

SourceCollection

CircleOptions

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

LineOptions

MarkerOptions

MarkerLabelOptions

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

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

CoordinateBounds

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

TrafficIncident