new UWA.Services.Geo(adapterName)
This service provide a geolocation using Client capabilities.
Example
var geo = new UWA.Services.Geo();
geo.getCurrentPosition(
function onSuccess (position) {
// position.coords.latitude
// position.coords.longitude
},
function onError (error) {
// Unable to get position...
}
);
Parameters
Name | Type | Description |
---|---|---|
adapterName |
Object | Adapter name or empty if should autodetect |
Index
Methods
Methods
-
getCurrentPosition(onSuccess, onError, options)
-
Get current position then call callback.
Parameters
Name Type Description onSuccess
Function on success callback
onError
Function on error callback
options
Object options