AnnotationsActions
public protocol AnnotationsActions
A protocol that defines map annotation actions.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Adds a new marker on the map using the
MarkerOptions.Throws
AnAnnotationServiceError.Declaration
Swift
func addMarker(options: MarkerOptions) throws -> MarkerParameters
optionsThe marker options.
Return Value
A
Markerinstance. -
Adds a new line on the map using the
LineOptions.Throws
AnAnnotationServiceError.Declaration
Swift
func addLine(options: LineOptions) throws -> LineParameters
optionsThe line options.
Return Value
A
Lineinstance. -
Adds a new polygon on the map using the
PolygonOptions.Throws
AnAnnotationServiceError.Declaration
Swift
func addPolygon(options: PolygonOptions) throws -> PolygonParameters
optionsThe polygon options.
Return Value
A
Polygoninstance. -
Adds a new polygon overlay (nested polygons) on the map using the
PolygonOverlayOptions.Throws
AnAnnotationServiceError.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
func addPolygonOverlay(options: PolygonOverlayOptions) throws -> PolygonOverlayParameters
optionsThe polygon options.
Return Value
A
PolygonOverlayinstance. -
Adds a new circle on the map using the
CircleOptions.Throws
AnAnnotationServiceError.Declaration
Swift
func addCircle(options: CircleOptions) throws -> CircleParameters
optionsThe circle options.
Return Value
A
Circleinstance. -
Removes a given annotation from the map.
Declaration
Swift
func remove(annotation: Annotation)Parameters
annotationThe annotation that will be removed.
-
Removes all annotations from the map.
Declaration
Swift
func removeAnnotations() -
Removes annotation having a particular tag from the map.
Declaration
Swift
func removeAnnotations(tag: String)Parameters
tagDescribing the annotation group.
-
Selects an annotation. You can provide view for selected annotation in
MapDataSource.Declaration
Swift
func select(annotation: Annotation) -
Deselects an annotation. You can provide view for selected annotation in
MapDataSource.Declaration
Swift
func deselect(annotation: Annotation) -
Zooms to a view containing all markers on the map with padding in px. Creates coordinate bounds and passes them to
FitToCoordinatesOptionsto update the camera with a one-second animation duration.Declaration
Swift
func zoomToMarkers(marginPx: UInt)Parameters
marginPxThe margin in pixels.
-
Zooms to a view containing all markers on the map with padding in px. Creates coordinate bounds and passes them to
FitToCoordinatesOptionsto update the camera with a one-second animation duration.Declaration
Swift
func zoomToMarkers(marginPx: UInt, tag: String) -
Zooms to a view containing all markers on the map. Creates coordinate bounds and passes it to
FitToCoordinatesOptionsto update camera with a one-second animation duration.Declaration
Swift
func zoomToMarkers() -
Zooms to a view containing all markers on the map.
Declaration
Swift
func zoomToMarkers(tag: String)Parameters
tagDescribing the annotation group.
-
Toggle fading effect for markers.
Declaration
Swift
var isMarkersFadingEnabled: Bool { get set } -
Sets the parameters of markers’ fading with distance effect.
Declaration
Swift
func setMarkerDistanceFadingRange(range: ClosedRange<Measurement<UnitLength>>)Parameters
rangeMinimum range distance when fading starts. It should be less than or equal to the maximum. Maximum range distance when a marker is fully transparent. It should be greater than or equal to the minimum.
-
Toggle shrinking effect for markers.
Declaration
Swift
var isMarkersShrinkingEnabled: Bool { get set } -
Sets the parameters of markers’ shrinking with distance effect.
Declaration
Swift
func setMarkerDistanceShrinkingRange(range: ClosedRange<Measurement<UnitLength>>)Parameters
rangeMinimum range distance when fading starts. It should be less than or equal to the maximum. Maximum range distance when a marker is fully transparent. It should be greater than or equal to the minimum.
TomTom SDK for iOS (0.53.1)
AnnotationsActions