AnnotationsActions
public protocol AnnotationsActions : AnyObject
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
Throws anAnnotationServiceErrorDeclaration
Swift
func addMarker(options: MarkerOptions) throws -> MarkerParameters
optionsThe marker options.
-
Adds a new line on the map using the
LineOptions.Throws
Throws anAnnotationServiceErrorDeclaration
Swift
func addLine(options: LineOptions) throws -> LineParameters
optionsThe line options.
-
Adds a new polygon on the map using the
PolygonOptions.Throws
Throws anAnnotationServiceErrorDeclaration
Swift
func addPolygon(options: PolygonOptions) throws -> PolygonParameters
optionsThe polygon options.
-
Adds a new polygon overlay (nested polygons) on the map using the
PolygonOverlayOptions.Throws
Throws anAnnotationServiceErrorDeclaration
Swift
func addPolygonOverlay(options: PolygonOverlayOptions) throws -> PolygonOverlayParameters
optionsThe polygon options.
-
Adds a new circle on the map using the
CircleOptions.Throws
Throws anAnnotationServiceErrorDeclaration
Swift
func addCircle(options: CircleOptions) throws -> CircleParameters
optionsThe circle options.
-
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() -
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) -
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() -
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(minimum: Int, maximum: Int)Parameters
minimumDistance in meters at which fading starts. Should be less than or equal to maximum.
maximumDistance in meters at which a marker is fully transparent. Should be greater than or equal to 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(minimum: Int, maximum: Int)Parameters
minimumDistance in meters at which fading starts. Should be less than or equal to maximum.
maximumDistance in meters at which a marker is fully transparent. Should be greater than or equal to minimum.
AnnotationsActions Protocol Reference