PeliasMapkitAnnotation

open class PeliasMapkitAnnotation: NSObject, MKAnnotation

PeliasMapkitAnnotation is a data object class that provides MapKit compatible annotation objects. It conforms to MKAnnotation protocol and is also used by the Mapzen iOS SDK for annotations (markers in Tangram-es).

  • Create a fully formed PeliasMapkitAnnotation

    Declaration

    Swift

    public init(coordinate: CLLocationCoordinate2D, title: String?, subtitle: String?, data: [String:AnyObject]?)

    Parameters

    coordinate

    A CLLocationCoordinate2D object for lat/long placement

    title

    An optional title for the annotation

    subtitle

    An optional subtitle for the annotation

    data

    An optional data dictionary useful for communicating additional metadata about an annotation

    Return Value

    A fully formed PeliasMapkitAnnotation

  • Sets a target for the selector which will be invoked when the annotation is clicked.

    Declaration

    Swift

    public func setTarget(target actionTarget: UIResponder, action: Selector)

    Parameters

    actionTarget

    A target to invoke the selector on when the annotation is clicked

    action

    An selector to be invoked on the target when the annotation is clicked