MLNPointAnnotation class
An MLNPointAnnotation object represents a one-dimensional shape located at a
single geographical coordinate. Depending on how it is used, an
MLNPointAnnotation object is known as a point annotation or point shape. For
example, you could use a point shape to represent a city at low zoom levels, an
address at high zoom levels, or the location of a long press gesture.
You can add point shapes to the map by adding them to an MLNShapeSource
object. Configure the appearance of an MLNShapeSource’s or
MLNVectorTileSource’s point shapes collectively using an MLNVectorTileSource or
MLNSymbolStyleLayer object.
For more interactivity, add a selectable point annotation to a map view using
the MLNMapView/addAnnotation: method. Alternatively, define your own model
class that conforms to the MLNAnnotation protocol. Configure a point
annotation’s appearance using
MLNMapViewDelegate/mapView:imageForAnnotation: or
MLNMapViewDelegate/mapView:viewForAnnotation: (iOS only). A point
annotation’s MLNShape/title and MLNShape/title properties define the
default content of the annotation’s callout (on iOS) or popover (on macOS).
To group multiple related points together in one shape, use an
MLNPointCollection or MLNPointCollection object. To access
a point’s attributes, use an MLNPointFeature object.
A point shape is known as a Point geometry in GeoJSON.
Related examples
TODO: Mark a place on the map with an annotation
TODO: Mark a place on the map with an image
TODO: Default callout usage
Learn how to add MLNPointAnnotation objects to your map.
- Inheritance
- Implementers
Constructors
- MLNPointAnnotation()
-
Returns a new instance of MLNPointAnnotation constructed with the default
newmethod.factory - MLNPointAnnotation.castFrom(ObjCObjectBase other)
-
Constructs a MLNPointAnnotation that points to the same underlying object as
other. -
MLNPointAnnotation.castFromPointer(Pointer<
ObjCObject> other, {bool retain = false, bool release = false}) - Constructs a MLNPointAnnotation that wraps the given raw object pointer.
Properties
- coordinate ↔ CLLocationCoordinate2D
-
The coordinate point of the shape, specified as a latitude and longitude.
getter/setter pairoverride-getter
- debugDescription$1 → NSString
-
debugDescription
no setterinherited
- description$1 → NSString
-
description
no setterinherited
- hash$1 → int
-
hash
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isProxy → bool
-
isProxy
no setterinherited
- ref → ObjCObjectRef
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subtitle ↔ NSString?
-
The subtitle of the shape annotation. The default value of this property is
nil.getter/setter pairinherited - superclass$1 → ObjCObjectBase
-
superclass
no setterinherited
- title ↔ NSString?
-
The title of the shape annotation.
getter/setter pairinherited
Methods
-
autorelease(
) → MLNPointAnnotation -
autorelease
override
-
class$1(
) → ObjCObjectBase -
class
inherited
-
conformsToProtocol$1(
Protocol aProtocol) → bool -
conformsToProtocol:
inherited
-
copy(
) → ObjCObjectBase -
copy
inherited
-
dealloc(
) → void -
dealloc
inherited
-
doesNotRecognizeSelector(
Pointer< ObjCSelector> aSelector) → void -
doesNotRecognizeSelector:
inherited
-
encodeWithCoder(
NSCoder coder) → void -
encodeWithCoder:
inherited
-
forwardingTargetForSelector(
Pointer< ObjCSelector> aSelector) → ObjCObjectBase -
forwardingTargetForSelector:
inherited
-
forwardInvocation(
NSInvocation anInvocation) → void -
forwardInvocation:
inherited
-
geoJSONDataUsingEncoding(
int encoding) → NSData -
Returns the GeoJSON string representation of the shape encapsulated in a data
object.
inherited
-
init(
) → MLNPointAnnotation -
init
override
-
initWithCoder(
NSCoder coder) → MLNPointAnnotation? -
initWithCoder:
override
-
isEqual(
ObjCObjectBase object) → bool -
isEqual:
inherited
-
isKindOfClass(
ObjCObjectBase aClass) → bool -
isKindOfClass:
inherited
-
isMemberOfClass(
ObjCObjectBase aClass) → bool -
isMemberOfClass:
inherited
-
methodForSelector(
Pointer< ObjCSelector> aSelector) → Pointer<NativeFunction< Void Function()> > -
methodForSelector:
inherited
-
methodSignatureForSelector(
Pointer< ObjCSelector> aSelector) → NSMethodSignature -
methodSignatureForSelector:
inherited
-
mutableCopy(
) → ObjCObjectBase -
mutableCopy
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performSelector(
Pointer< ObjCSelector> aSelector) → ObjCObjectBase -
performSelector:
inherited
-
performSelector$1(
Pointer< ObjCSelector> aSelector, {required ObjCObjectBase withObject}) → ObjCObjectBase -
performSelector:withObject:
inherited
-
performSelector$2(
Pointer< ObjCSelector> aSelector, {required ObjCObjectBase withObject, required ObjCObjectBase withObject$1}) → ObjCObjectBase -
performSelector:withObject:withObject:
inherited
-
release(
) → void -
release
inherited
-
respondsToSelector(
Pointer< ObjCSelector> aSelector) → bool -
respondsToSelector:
inherited
-
retain(
) → MLNPointAnnotation -
retain
override
-
retainCount(
) → int -
retainCount
inherited
-
self$1(
) → MLNPointAnnotation -
self
override
-
toString(
) → String -
A string representation of this object.
inherited
-
zone(
) → Pointer< NSZone> -
zone
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
alloc(
) → MLNPointAnnotation -
alloc
override
-
allocWithZone(
Pointer< NSZone> zone) → MLNPointAnnotation -
allocWithZone:
override
-
getSupportsSecureCoding(
) → bool -
supportsSecureCoding
override
-
isInstance(
ObjCObjectBase obj) → bool -
Returns whether
objis an instance of MLNPointAnnotation.override -
new$(
) → MLNPointAnnotation -
new
override
-
shapeWithData(
NSData data, {required int encoding, required Pointer< Pointer< error}) → MLNShape?ObjCObject> > -
Returns an
MLNShapeobject initialized with the given data interpreted as a string containing a GeoJSON object.override