Wikitude ARchitect v2.0 API Documentation

Wikitude ARchitect > AR > GeoLocation
Filters

Class GeoLocation - extends Location

Every instance of GeoLocation represents a location in the earth's three-dimensional space.

A GeoLocation consists of latitude and longitude and an optional altitude property. If the altitude is not specified, the altitude will be set to AR.CONST.UNKNOWN_ALTITUDE. In the application, the altitude of the location will implicitly set to the user's current altitude.

The Coordinate system used is WGS 84 (see the Wikipedia article for details).

Typically, GeoLocations will be created and then used for the creation of GeoObjects and ActionRanges.

Example:
var location1 = new AR.GeoLocation(47.77317, 13.069929);
var altitude = location1.altitude; //altitude = -32768
var location2 = new AR.GeoLocation(47.77317, 13.069929, 320.);
altitude = location2.altitude; //alt = 320
var object1 = new AR.GeoObject(location1);
var object2 = new AR.GeoObject(location2);

Constructor

GeoLocation ( latitude , longitude , altitude )
Parameters:
latitude <float> The latitude of the location, in decimal degrees.
longitude <float> The longitude of the location, in decimal degrees.
altitude <float> The altitude of the location, in meters (optional).

Properties

altitude - float

The altitude of the location, in meters. Values must be numeric values, otherwise, an Exception will be thrown.
Default Value: AR.CONST.UNKNOWN_ALTITUDE

latitude - float

The latitude of the location, in decimal degrees. Values must be numeric values in range [-90, 90], otherwise, an Exception will be thrown.

longitude - float

The longitude of the location, in decimal degrees. Values must be numeric values in range [-180, 180], otherwise, an Exception will be thrown.

Properties inherited from ARchitectObject:

Methods inherited from ARchitectObject:

Methods inherited from Location:


Copyright © 2013 Wikitude GmbH. All rights reserved.