MaplyShapeLinear
Objective-C
@interface MaplyShapeLinear : MaplyShape
Swift
class MaplyShapeLinear : MaplyShape
A linear feature offset from the globe.
The main difference between this object and a regular MaplyVectorObject is that you specify coordiantes in 3D. You can use this to create linear features that are offset from the globe.
-
Line width in pixels
The linear is implemented as a set of line segments in OpenGL ES. This is their line width in pixels.
Declaration
Objective-C
@property (nonatomic) float lineWidth;
Swift
var lineWidth: Float { get set }
-
Initialize with coordinates and coordinate array size
This initializer will make a copy of the coordinates and use them to draw the lines. The x and y values are in geographic. The z values are offsets from the globe (or map) and are in display units. For the globe display units are based on a radius of 1.0.
Declaration
Objective-C
- (nullable instancetype)initWithCoords:(MaplyCoordinate3d *_Nonnull)coords numCoords:(int)numCoords;
Swift
init?(coords: UnsafeMutablePointer<MaplyCoordinate3d>, numCoords: Int32)
-
Return the coordinates for this linear feature.
Declaration
Objective-C
- (int)getCoords:(MaplyCoordinate3d *_Nullable *_Nonnull)retCoords;
Swift
func getCoords(_ retCoords: UnsafeMutablePointer<UnsafeMutablePointer<MaplyCoordinate3d>?>) -> Int32
Return Value
Returns the number of coordinates and a pointer to the coordinate array.