Wikitude ARchitect v2.0 API Documentation

Wikitude ARchitect > AR > RelativeLocation
Filters

Class RelativeLocation - extends Location

A relative location describes a location that is relative to either another Location, or the location of the user.

It is specified using the northing and easting of the location in relation to the referenced location. An optional altitudeDelta can also be applied.
Example:
//a relative location being 12 meters south, 20 meters west and 13 meters lower than current position of the user
var location2 = new AR.RelativeLocation(null, -12, -20, -13);
var geoLoc = new AR.GeoLocation(47.77317, 13.069929, 320.);
//a relative location being 12 meters north, 20 meters east and 13 meters higher than geoLoc
var location1 = new AR.RelativeLocation(geoLoc, 12, 20, 13);
Relative locations move with their referenced locations.

Constructor

RelativeLocation ( location , northing , easting , altitudeDelta )
Parameters:
location <Location> The location which is used as the reference point. If null is passed, the current position of the user is used as a reference point.
northing <float> Specifies the number of meters the relative location is further north than the referenced location. A negative value specifies the number of meters south.
easting <float> Specifies the number of meters the relative location is further east than the referenced location. A negative value specifies the number of meters west.
altitudeDelta <float> optional. Specifies the number of meters the relative location is higher (positive) or lower (negative) than the referenced location. This is also applied when the altitude of the referenced location is unknown, causing the relative location to definitely appear higher or lower then the referenced location.

Properties

altitudeDelta - float

Specifies the number of meters the relative location is higher (positive) or lower (negative) than the referenced location. This is also applied when the altitude of the referenced location is unknown, causing the relative location to definitely appear higher or lower then the referenced location. If the property is set to null, 0 will be applied as the altitudeDelta.

easting - float

Specifies the number of meters the relative location is further east than the referenced location. A negative value specifies the number of meters west.

location - Location

The location which is used as the reference point. If null is passed, the current position of the user is used as a reference point.

northing - float

Specifies the number of meters the relative location is further north than the referenced location. A negative value specifies the number of meters south.

Properties inherited from ARchitectObject:

Methods inherited from ARchitectObject:

Methods inherited from Location:


Copyright © 2013 Wikitude GmbH. All rights reserved.