Available on AIR, Android, Flash, Linux, Neko, Windows, iOS, macOS
A Geolocation object dispatches GeolocationEvent objects when it receives updates from the location sensor installed on the device.
new(type:String, bubbles:Bool = false, cancelable:Bool = false, latitude:Float = 0, longitude:Float = 0, altitude:Float = 0, hAccuracy:Float = 0, vAccuracy:Float = 0, speed:Float = 0, heading:Float = 0, timestamp:Float = 0)
Creates a GeolocationEvent object that contains information about the location of the device. Event objects are passed as parameters to event listeners.
The altitude in meters.
If altitude is not supported by the device, then this property is set to
The direction of movement (with respect to true north) in integer degrees. This is not the same as "bearing", which returns the direction of movement with respect to another point.
Note: On Android devices, heading is not supported. The value of the
heading property is always
Math.NaN (Not a Number).
The horizontal accuracy in meters.
The latitude in degrees. The latitude values have the following range:
latitude <= 90). Negative latitude is south and positive
latitude is north.
The longitude in degrees. The longitude values have the following range:
longitude < 180). Negative longitude is west and positivelongitude is east.
The speed in meters/second.
The number of milliseconds at the time of the event since the runtime was initialized. For example, if the device captures geolocation data 4 seconds after the application initializes, then the timestamp property of the event is set to 4000.
The vertical accuracy in meters.