• The MGLAnnotation protocol is used to provide annotation-related information to a map view. To use this protocol, you adopt it in any custom objects that store or represent annotation data. Each object then serves as the source of information about a single map annotation and provides critical information, such as the annotation’s location on the map. Annotation objects do not provide the visual representation of the annotation but typically coordinate (in conjunction with the map view’s delegate) the creation of an appropriate objects to handle the display.

    An object that adopts this protocol must implement the coordinate property. The other methods of this protocol are optional.

    See more

    Declaration

    Objective-C

    @protocol MGLAnnotation <NSObject>

    Swift

    protocol MGLAnnotation : NSObjectProtocol
  • The MGLAnnotationImage class is responsible for presenting point-based annotations visually on an MGLMapView instance. Annotation image objects pair NSImage objects with annotation-related metadata. They may be recycled later and put into a reuse queue that is maintained by the map view.

    See more

    Declaration

    Objective-C

    
    @interface MGLAnnotationImage : NSObject <NSSecureCoding>

    Swift

    class MGLAnnotationImage : NSObject, NSSecureCoding
  • The MGLOverlay protocol defines a specific type of annotation that represents both a point and an area on a map. Overlay objects are essentially data objects that contain the geographic data needed to represent the map area. Overlays can take the form of a polyline or polygon.

    You use overlays to layer more sophisticated content on top of a map view. For example, you could use an overlay to show the boundaries of a national park or trace a bus route along city streets. This SDK defines several concrete classes that conform to this protocol and define standard shapes.

    See more

    Declaration

    Objective-C

    @protocol MGLOverlay <MGLAnnotation>

    Swift

    protocol MGLOverlay : MGLAnnotation
  • The MGLMultiPoint class is an abstract superclass used to define shapes composed of multiple vertices.

    Create instances of MGLPolyline or MGLPolygon in order to use properties of MGLMultiPoint. Do not create instances of MGLMultiPoint directly and do not create your own subclasses of this class. You can use the method and properties of this class to access information about the vertices of the line or polygon.

    Do not confuse MGLMultiPoint with MGLPointCollection, which represents a collection of related but disconnected points.

    See more

    Declaration

    Objective-C

    
    @interface MGLMultiPoint : MGLShape

    Swift

    class MGLMultiPoint : MGLShape