MarkerOptions
public struct MarkerOptions : AnnotationOptions, Equatable
A type that represents marker options.
-
Creates an instance of MarkerOptions with a coordinate.
Declaration
Swift
public init(coordinate: CLLocationCoordinate2D, tag: String? = nil)Parameters
coordinateThe coordinate for the marker.
tagOptional string tag associated with the marker.
-
Creates an instance of MarkerOptions with a coordinate, and a pin image.
Declaration
Swift
public init(coordinate: CLLocationCoordinate2D, pinImage: UIImage, tag: String? = nil)Parameters
coordinateThe coordinate for the marker.
pinImageThe image used for the marker pin.
tagOptional string tag associated with the marker.
-
Creates an instance of MarkerOptions with a coordinate, and a pin image.
Declaration
Swift
public init(coordinate: CLLocationCoordinate2D, pinImageURI: String, tag: String? = nil)Parameters
coordinateThe coordinate for the marker.
pinImageURIThe pin URI used for the marker pin image.
tagOptional string tag associated with the marker.
-
Coordinate of the marker.
Declaration
Swift
@EquatableWrapper public private(set) var coordinate: CLLocationCoordinate2D { get set } -
Image used for the marker pin.
Declaration
Swift
public var pinImage: UIImage? -
Decides if the marker is selectable. Default value is
true. Indicates if given marker can produce delegate call onMapDelegatefunc map(_ map: Map, didTapOnAnnotation annotation: Annotation, onCoordinate coordinate: CLLocationCoordinate2D)Declaration
Swift
public var isSelectable: Bool -
Icon image for the marker.
Declaration
Swift
public var iconImage: UIImage? -
Sets the pin URI. To make it work, you also need
COMPRESS_PNG_FILESandSTRIP_PNG_TEXTset toNOin Xcode build settings.Declaration
Swift
public var pinImageURI: String? -
Sets the icon URI. If both iconImage and iconImageURI are provided, iconImage will be ignored. To make it work, you also need
COMPRESS_PNG_FILESandSTRIP_PNG_TEXTset toNOin Xcode build settings.Declaration
Swift
public var iconImageURI: String? -
Optional label to draw inside marker.
Declaration
Swift
public var label: MarkerLabelOptions? -
Sets the position on the pin that will be matched with the marker coordinate on the map. Specified in unit coordinates of the pin from its top-left corner. The default is bottom-center of the pin image i.e. [0.5, 1.0]. When the given x/y values are outside of the range [0, 1], the placement anchor moves more than the width/height of the pin.
Declaration
Swift
public var placementAnchor: CGPoint -
Describing the annotation group.
Declaration
Swift
public let tag: String? -
Scaling factor for marker.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public var scalingFactor: Double?
TomTom SDK for iOS (0.53.1)
MarkerOptions