MaplyGeomModelInstance

Objective-C

@interface MaplyGeomModelInstance : NSObject

Swift

class MaplyGeomModelInstance : NSObject

Place a geometry model at a given location

Geometry models tend to be expensive so we load and place them in a two step process. First you create the MaplyGeomModel and then you place it in one or more spots with this MaplyGeomModelInstance.

  • 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 model instance means to them.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) id userObject;

    Swift

    var userObject: Any? { get set }
  • The model to instance

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) MaplyGeomModel *model;

    Swift

    var model: MaplyGeomModel? { get set }
  • Where we’d like to place the instanced model.

    This is the center of the object in geographic radians.

    Declaration

    Objective-C

    @property (nonatomic) MaplyCoordinate3d center;

    Swift

    var center: MaplyCoordinate3d { get set }
  • Transform used to oriented the model instance

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) MaplyMatrix *transform;

    Swift

    var transform: MaplyMatrix? { get set }
  • Color to force all polygons to use. If set, this will force all polygons to use this color. nil by default.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) UIColor *colorOverride

    Swift

    var colorOverride: UnsafeMutablePointer<Int32>? { get set }
  • Set if you want to select these

    Declaration

    Objective-C

    @property (nonatomic) _Bool selectable;

    Swift

    var selectable: Bool { get set }