Structures
The following structures are available globally.
-
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.Declaration
Swift
public struct ControlPoint
extension ControlPoint: Equatable
-
Storage configration for follow camera operator.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct FollowCameraOperatorConfig
extension FollowCameraOperatorConfig: Equatable
-
A type that represents CameraProperties: position, zoom, tilt and rotation
See moreDeclaration
Swift
public struct CameraProperties
-
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:)
orTomTomMap.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:)
andmoveCamera(_:)
through theTomTomMap
, there are certainCameraUpate
properties that can and cannot be used in conjunction with others:
init(position:zoom:tilt:rotation:positionMarkerVerticalOffset:scale:fieldOfView:)
:zoom
- cannot be used together withscale
.scale
- cannot be used together withzoom
.
init(zoomBy:zoomIn:zoomOut:tiltBy:rotateBy:moveBy:fieldOfViewChangeBy:)
:zoomBy
- cannot be used together withzoomIn
orzoomOut
.zoomIn
- cannot be used together withzoomOut
orzoomBy
.zoomOut
- cannot be used together withzoomIn
orzoomBy
.moveBy
- cannot be used together with any of the other properties.- When setting directly the
cameraUpdate
field through theMapView
, no animation is applied and only these specific properties can be set:
- When setting directly the
position
.zoom
- cannot be used together withscale
.tilt
.rotation
.scale
- cannot be used together withzoom
.fieldOfView
.moveBy
- cannot be used together with any of the other properties.
Declaration
Swift
public struct CameraUpdate : Equatable
-
A type that represents a set of coordinates and the padding around them.
See moreDeclaration
Swift
public struct FitToCoordinatesOptions : Equatable
-
Defines map visible region as
See moreCLLocationCoordinate2D
coordinates.Declaration
Swift
public struct VisibleRegion
-
An OptionSet that defines available gestures for
See moreExclusiveGestureManager.
Declaration
Swift
public struct GestureType : OptionSet, Hashable
-
Holder struct for main and dark version of the style definition. If
See moredarkStyle
is not provided, settingTomTomMap.styleMode
has no effect.Declaration
Swift
public struct StyleContainer
extension StyleContainer: Equatable
-
Defines size for chevron or pointer for particular zoom level.
See moreDeclaration
Swift
public struct PositionMarkerSize
extension PositionMarkerSize: Equatable
-
The
See moreMetadata
is used to carry extra information.Declaration
Swift
public struct Metadata
-
Tile source definition. Details can be found: https://github.com/mapbox/tilejson-spec
Declaration
Swift
public struct TilesDefinition
-
The SourceCollection
See moreDeclaration
Swift
public struct SourceCollection
-
A type that represents circle options.
See moreDeclaration
Swift
public struct CircleOptions : AnnotationOptions, Equatable
-
Scene color.
See moreDeclaration
Swift
public struct SceneColor : Equatable
-
Width scene.
See moreDeclaration
Swift
public struct WidthScene : Equatable
-
Outline width scene.
See moreDeclaration
Swift
public struct OutlineWidthScene : Equatable
-
Reserve coordinate.
See moreDeclaration
Swift
public struct ReserveCoordinate : Equatable
-
Coordinate along line.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct CoordinateAlongLine : Equatable
-
Line pattern.
See moreDeclaration
Swift
public struct LinePattern : Equatable
-
Pattern length scene.
See moreDeclaration
Swift
public struct PatternLengthScene : Equatable
-
Pattern begin offset scene.
See moreDeclaration
Swift
public struct PatternBeginOffsetScene : Equatable
-
Line options.
See moreDeclaration
Swift
public struct LineOptions : AnnotationOptions, Equatable
-
A type that represents marker options.
See moreDeclaration
Swift
public struct MarkerOptions : AnnotationOptions, Equatable
-
Options that define label inside marker. Can be used with
See moreMarkerOptions
.Declaration
Swift
public struct MarkerLabelOptions : AnnotationOptions, Equatable
-
Type that represents texture options.
See moreDeclaration
Swift
public struct TextureOptions : Equatable
-
Polygon options.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct PolygonOptions : AnnotationOptions, Equatable
-
Class that contains configuration of the route that will be drawn on the map.
Example:
See morelet routeOption: RouteOptions = RouteOptions(coordinates: route.geometry) guard let mapRoute = try? self.mapView.map.addRoute(routeOption) else { return }
Declaration
Swift
public struct RouteOptions
-
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
See moreRouteOptions
as part of the route’s configuration that is drawn on the map.Declaration
Swift
public struct RouteSection
-
Represents traffic incident details.
See moreDeclaration
Swift
public struct TrafficIncident
-
Protobuf-encoded map tile data. The format of the tile data is formally described using the protobuf schema available on: https://developer.tomtom.com/map-display-api/documentation/vector/content#schema-data
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct MapTile
-
Describes options to request map tiles for given zoom and coordinate.
Detailed explanation of values can be found on: https://developer.tomtom.com/map-display-api/documentation/zoom-levels-and-tile-grid
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct MapTileOptions : Equatable