Location Class
Location is an abstract class which describes a general
location of a POI in the augmented scene.
It should never be instantiated directly.
Methods
destroy
()
Destroys the object.
distanceTo
(
Number
-
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
LocationThe Location the distance should be calculated for.
Returns:
Number:
The numeric distance in meters.