-
The
MGLAnnotationImage
class is responsible for presenting point-based annotations visually on a map view. Annotation image objects wrapUIImage
objects and may be recycled later and put into a reuse queue that is maintained by the map view.Related examples
See the Mark a place on the map with an image example to learn how use an image as a marker using
See moreMGLAnnotationImage
.Declaration
Objective-C
@interface MGLAnnotationImage : NSObject <NSSecureCoding>
Swift
class MGLAnnotationImage : NSObject, NSSecureCoding
-
The
MGLAnnotationView
class is responsible for marking a point annotation with a view. Annotation views represent an annotation object, which is an object that corresponds to theMGLAnnotation
protocol. When an annotation’s geographic coordinate is visible in the map view, the map view asks its delegate to a corresponding annotation view. If an annotation view is created with a reuse identifier, the map view may recycle the view when it goes offscreen.Annotation views are compatible with UIKit, Core Animation, and other Cocoa Touch frameworks. On the other hand, if you do not need animation or interactivity such as dragging, you can use an
See moreMGLAnnotationImage
instead to conserve memory and optimize drawing performance.Declaration
Objective-C
@interface MGLAnnotationView : UIView <NSSecureCoding>
Swift
class MGLAnnotationView : UIView, NSSecureCoding
-
The MGLUserLocation class defines a specific type of annotation that identifies the user’s current location. You do not create instances of this class directly. Instead, you retrieve an existing
MGLUserLocation
object from theuserLocation
property of the map view displayed in your application.Related examples
See the Customize the user location annotation example to learn how to overide the default user location annotation.
See moreDeclaration
Objective-C
@interface MGLUserLocation : NSObject <MGLAnnotation, NSSecureCoding>
Swift
class MGLUserLocation : NSObject, MGLAnnotation, NSSecureCoding
-
View representing an
See moreMGLUserLocation
on screen.Declaration
Objective-C
@interface MGLUserLocationAnnotationView : MGLAnnotationView
Swift
class MGLUserLocationAnnotationView : MGLAnnotationView