WRLDPositioner Class Reference

A Positioner represents a single point on the map. The primary purpose of a positioner is to expose a point on the map as a 2D coordinate in screen space. This could be used for example to position a View.

+ positionerAtCoordinate:

+ (instancetype)positionerAtCoordinate:(CLLocationCoordinate2D)coordinate

Instantiate a positioner at a given location.

Returns:

A WRLDPositioner instance.

Argument Description
coordinate

The coordinate to place this positioner at.

+ positionerAtCoordinate:inIndoorMap:onFloor:

+ (instancetype)positionerAtCoordinate:(CLLocationCoordinate2D)coordinate inIndoorMap:(NSString *)indoorMapId onFloor:(NSInteger)indoorMapFloorId

Instantiate a positioner at a given location, optionally indoors.

Returns:

A WRLDPositioner instance.

Argument Description
coordinate

The coordinate to place this positioner at.

indoorMapId

The ID of an indoor map this positioner should be inside. (See WRLDIndoorMap).

indoorMapFloorId

An index specifying which floor of the indoor map this positioner should be on. (See WRLDIndoorMap).

@property coordinate

@property (nonatomic) CLLocationCoordinate2D coordinate

The geographic location of the positioner.

@property elevation

@property (nonatomic) CLLocationDistance elevation

The height of the positioner 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 positioner 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, readonly, copy) NSString *indoorMapId

The ID of the indoor map this positioner is associated with - if any.

@property indoorMapFloorId

@property (nonatomic, readonly) NSInteger indoorMapFloorId

The index of the floor this positioner is associated with - if any.

– screenPointOrNull

- (nullable CGPoint *)screenPointOrNull

Returns the screen point. Use screenPointProjectionDefined() to check that this point is valid and not over the horizon.

Returns:

The screen point or null.

– transformedPointOrNull

- (nullable WRLDCoordinateWithAltitude *)transformedPointOrNull

Returns the geographical coordinate that is used to derive the screen-projected point that is accessed with screenPointOrNull. The coordinate may change depending on the animated state of the map - for example when displaying in collapsed mode.

Returns:

The transformed point or null.

– behindGlobeHorizon

- (BOOL)behindGlobeHorizon

Returns true if the screen projection of this positioner would appear beyond the horizon for the current viewpoint. For example, when viewing the map zoomed out so that the entire globe is visible, calling this method on a Positioner instance located on the opposite side of the Earth to the camera location will return true.

Returns:

True if the screen point is beyond the horizon.

– screenPointProjectionDefined

- (BOOL)screenPointProjectionDefined

Returns true if the screen point is valid for drawing. This returns true if the screen point is valid and is on this side of the horizon. The screen point may be outwith the screen area.

Returns:

True if the screen point is valid for drawing.

v0.0.1600