WRLDPolygon Class Reference

A Polygon is a shape consisting of three or more vertices and is placed on or above the map. Optionally polygons can contain one or more interior polygons which define cutout regions in the polygon. Their color can also be modified.

+ polygonWithCoordinates:count:

+ (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count

Instantiate a polygon with coordinates.

Returns:

A WRLDPolygon instance.

Argument Description
coords

The array of coordinates that define the polygon. The data in this array is copied to the new object.

count

The number of items in the coordinates array.

+ polygonWithCoordinates:count:interiorPolygons:

+ (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count interiorPolygons:(NSArray<WRLDPolygon*> *)interiorPolygons

Instantiate a polygon with coordinates.

Returns:

A WRLDPolygon instance.

Argument Description
coords

The array of coordinates that define the perimeter of the polygon.

count

The number of items in the coordinates array.

interiorPolygons

An array of WRLDPolygon objects that define cutout regions in the polygon.

+ polygonWithCoordinates:count:onIndoorMap:onFloor:

+ (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count onIndoorMap:(NSString *)indoorMapId onFloor:(NSInteger)floorId

Instantiate a polygon with coordinates.

Returns:

A WRLDPolygon instance.

Argument Description
coords

The array of coordinates that define the polygon. The data in this array is copied to the new object.

count

The number of items in the coordinates array.

indoorMapId

The id of the indoor map on which the polygon will be displayed.

floorId

The id of the indoor map floor on which the polygon will be displayed.

+ polygonWithCoordinates:count:interiorPolygons:onIndoorMap:onFloor:

+ (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count interiorPolygons:(NSArray<WRLDPolygon*> *)interiorPolygons onIndoorMap:(NSString *)indoorMapId onFloor:(NSInteger)floorId

Instantiate a polygon with coordinates.

Returns:

A WRLDPolygon instance.

Argument Description
coords

The array of coordinates that define the exterior polygon. The data in this array is copied to the new object.

count

The number of items in the exterior coordinates array.

interiorPolygons

An array of WRLDPolygon objects that define cutout regions in the polygon

indoorMapId

The id of the indoor map on which the polygon will be displayed.

floorId

The id of the indoor map floor on which the polygon will be displayed.

@property color

@property (nonatomic, copy) UIColor *color

The color of the polygon.

@property elevation

@property (nonatomic) CLLocationDistance elevation

The height of the polygon above either the ground, or sea-level, depending on the elevationMode property.

@property elevationMode

@property (nonatomic) WRLDElevationMode elevationMode

Specifies how the elevation property of this polygon is interpreted:

  • WRLDElevationModeHeightAboveSeaLevel: The elevation is an absolute altitude above mean sea level, in meters.
  • WRLDElevationModeHeightAboveGround: The elevation is a height relative to the map’s terrain, in meters.

@property indoorMapId

@property (nonatomic, copy) NSString *indoorMapId

For a polygon to be displayed on an indoor map, the id of the indoor map (else nil).

@property indoorFloorId

@property (nonatomic) NSInteger indoorFloorId

For an indoor map polygon, the floor id of the floor on which the polygon will be displayed

v0.0.1600