PointAnnotation
public struct PointAnnotation : Annotation
extension PointAnnotation: Equatable
Marks a single coordinate on the map with a customizable icon. By default, this is an image of a red pin.
-
Uniquely identifies the annotation.
Declaration
Swift
public private(set) var identifier: String { get } -
The type of the annotation - in this case, a point.
Declaration
Swift
public private(set) var type: AnnotationType { get } -
The text string containing the annotation’s title. If the value is defined, the map shows an the annotation’s title near the annotation.
Declaration
Swift
public var title: String? -
Whether or not the annotation has been selected, either via a tap gesture or programmatically.
Declaration
Swift
public var isSelected: Bool -
Controls whether or not the user can drag the annotation across the map.
Declaration
Swift
public var isDraggable: Bool -
The image containing a annotation’s icon to show on the map. If the value is
nil, then a red pin image is used, representing the default point annotation icon image.Declaration
Swift
public var image: UIImage? -
The center coordinate of the annotation.
The annotation is rendered on the map at this location.
Declaration
Swift
public var coordinate: CLLocationCoordinate2D -
The optional userInfo associated with the point annotation.
Declaration
Swift
public var userInfo: [String : Any]?
-
Creates a new
Annotationinitialized with a given coordinate.Note
This method does make the annotation visible. Use AnnotationManager.addAnnotation(_ annotation:) to render it on the map view.
Declaration
Swift
public init(coordinate: CLLocationCoordinate2D, image: UIImage? = nil)Parameters
coordinateThe center coordinate of the annotation.
Return Value
Annotationinstance initialized with a given coordinate.
-
Undocumented
Declaration
Swift
public func defaultAnnotationImage() -> UIImage -
Declaration
Swift
public static func == (lhs: PointAnnotation, rhs: PointAnnotation) -> Bool
PointAnnotation Structure Reference