UserLocationEvent RPC
Notifies user location.
Description
Used to notify that the GetUserLocationRequest
has received a user geolocation. If getting user location fails then event contains error and lon, lat and accuracy are null otherwise error is null.
Parameters
(* means the parameter is required)
Name | Type | Description | Default value |
---|---|---|---|
\* lon | Number | x coordinate of user location | |
\* lat | Number | y coordinate of user location | |
\* accuracy | Number | location accuracy in meters | |
\* error | String | Possible values: null, 'denied', 'unavailable', 'timeout' |
RPC
Event occurs after user's location is fetched
{
"lon": 386436.3607007161,
"lat": 6672447.439965934,
"accuracy": 150,
"error": null
}
Event with eror occurs after user's location fetch is failed
{
"lon": null,
"lat": null,
"accuracy": null,
"error": "denied"
}
Event methods
getName()
Returns event name.
getLon()
Returns x coordinate of user location.
getLat()
Returns y coordinate of user location.
getAccuracy()
Returns location accuracy.
getError()
Returns error if occured.
getParams()
RPC needed function. Tells event parameters.