MaplyMarker

Objective-C

@interface MaplyMarker : NSObject

Swift

class MaplyMarker : NSObject

The Marker places a UIImage on the globe or map at a given location.

The Maply Marker takes a location and image, using those to display a textured rectangle on the globe (or map). Since it’s a real 3D object it will get larger and smaller as the user moves around.

If you want a screen based object that stays the same size and is displayed on top of everything else, look to the MaplyScreenMarker.

  • loc

    Center of the marker in geographic coordinates (lon/lat in radians).

    The Maply Marker is a 3D object so this is the center of the marker on the globe or map.

    Declaration

    Objective-C

    @property (nonatomic) MaplyCoordinate loc;

    Swift

    var loc: MaplyCoordinate { get set }
  • Size of the marker in display coordinates.

    This is the size of the marker in display coordinates. For the globe display coordinates are based on a radius of 1.0.

    Declaration

    Objective-C

    @property (nonatomic) CGSize size;

    Swift

    var size: CGSize { get set }
  • Image or MaplyTexture to use for the marker.

    If set, we’ll display a UIImage at the given location of the given size. If not set, it’s just a color rectangle which is not very exciting. The view controller tracks the UIImage and will reuse it as necessary and release it when finished.

    Declaration

    Objective-C

    @property (nonatomic, strong) id _Nullable image;

    Swift

    var image: Any? { get set }
  • Images or MaplyTextures to use for the marker.

    If set we’ll animate these images one after the other over the duration.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray *_Nullable images;

    Swift

    var images: [Any]? { get set }
  • The time we’ll take to cycle through all the images for the marker.

    If images are passed in, this is the time it will take to cycle through them all. By default this is 5s.

    Declaration

    Objective-C

    @property (nonatomic) double period;

    Swift

    var period: Double { get set }
  • Marker selectability. On by default

    If set, this marker can be selected by the user. If not set, this marker will never appear in selection results.

    Declaration

    Objective-C

    @property (nonatomic) _Bool selectable;

    Swift

    var selectable: Bool { get set }
  • User data object for selection

    When the user selects a feature and the developer gets it in their delegate, this is an object they can use to figure out what the label means to them.

    Declaration

    Objective-C

    @property (nonatomic, strong) id _Nullable userObject;

    Swift

    var userObject: Any? { get set }