Classes
The following classes are available globally.
-
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 }
See more- Important: This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
final public class MapsDisplayService
-
Default implementation of
See moreCopyrightsService
.Declaration
Swift
final public class TomTomCopyrightsService : CopyrightsService
-
Allows the user to configure the initial parameters of the map.
MapOptions
is used in conjunction withMapView
initialization, i.e: When creating aMapView
, it is possible to pass aMapOptions
object to configure theMapView
before it is showing on the screen, for example, creating aMapView
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
See moreMapView
without passing aMapOptions
object, will result in theMapView
being created using the deafult values. In such case, the API Key that will be used for the map will be taken fromMapsDisplayService.apiKey
.Declaration
Swift
public class MapOptions : NSObject
-
The
See moreLayer
protocol that represents map layer.Declaration
Swift
public class Layer
-
The
See moreStyle
protocol that represents the map style.Declaration
Swift
public final class Style
-
Represents the circle on the map.
See moreDeclaration
Swift
public class Circle : Annotation
-
Options that defines inner polygon. Can be used with
PolygonOverlayOptions
.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public class InnerPolygonOptions : AnnotationOptions
-
Represents the line on the map.
See moreDeclaration
Swift
public class Line : Annotation
-
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.Declaration
Swift
public class PolygonOverlay : Annotation
-
Options for creating a
PolygonOverlay
.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public class PolygonOverlayOptions : AnnotationOptions
-
Represents the marker on the map.
See moreDeclaration
Swift
public class Marker : Annotation
-
Represents the polygon on the map.
See moreDeclaration
Swift
public class Polygon : Annotation
-
Class specifying the
Route
object.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public class Route
-
Use the
See moreMapView
object to display the map in the view hierarchy.Declaration
Swift
@objc open class MapView : UIView
-
TomTomMap aggregates core map functionalities
See moreDeclaration
Swift
public class TomTomMap : AnnotationsActions, RouteActions, MapActions
extension TomTomMap: CameraActions
extension TomTomMap: RenderedFeatureActions
extension TomTomMap: VehicleActions, LocationActions