Wikitude ARchitect v2.0 API Documentation

Wikitude ARchitect > AR > Location
Filters

Class Location - extends ARchitectObject

Known Subclasses:
GeoLocation RelativeLocation
Location is an abstract class which describes a general location of a POI in the augmented scene.

It should never be instantiated directly.

Properties inherited from ARchitectObject:

Methods

distanceTo

float distanceTo ( location )
Returns the shortest distance ("as the crow flies") to the Location passed as an argument, ignoring any altitude property.

Example:
var location1 = new AR.GeoLocation(47.77317, 13.069929);
var location2 = new AR.GeoLocation(47.77317, 13.069929, 320.);
var location3 = new AR.GeoLocation(47.77317, 14.069929, 640.);
var dist = location2.distanceTo(location1); //dist = 0.
dist = location2.distanceTo(location3); //dist = 74730.
Parameters:
location <Location> The Location the distance should be calculated for.
Returns: float
The numeric distance in meters.

distanceToUser

float distanceToUser ( )
Returns the shortest distance ("as the crow flies") to the current location of the user, ignoring any altitude property.

If the current position of the user cannot be determined, undefined will be returned.
Returns: float
The numeric distance in meters.

Methods inherited from ARchitectObject:


Copyright © 2013 Wikitude GmbH. All rights reserved.