Geolocation
Supported platforms: android, ios
Available since: Gideros 2012.8
Description
The `Geolocation` class is used to configure the parameters and dispatching of location and heading related events.
Examples
Example
geolocation = Geolocation.new()<br />
<br />
local function onLocationUpdate(event)<br />
print("location: ", event.latitude, event.longitude, event.altitude)<br />
end<br />
<br />
local function onHeadingUpdate(event)<br />
print("heading: ", event.magneticHeading, event.trueHeading)<br />
end<br />
<br />
geolocation:addEventListener(Event.LOCATION_UPDATE, onLocationUpdate)<br />
geolocation:addEventListener(Event.HEADING_UPDATE, onHeadingUpdate)<br />
geolocation:start()
MethodsGeolocation.getAccuracy - Geolocation - returns the previously set desired accuracy |
EventsEvent.ERROR Constants |