The Geolocation
interface represents an object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location.
Documentation Geolocation by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
Fields
watchPosition(successCallback:Position ‑> Void, ?errorCallback:PositionError ‑> Void, ?options:PositionOptions):Int
Returns a long
value representing the newly established callback function to be invoked whenever the device location changes.
Throws:
null | DOMError |
---|
getCurrentPosition(successCallback:Position ‑> Void, ?errorCallback:PositionError ‑> Void, ?options:PositionOptions):Void
Determines the device's current location and gives back a Position
object with the data.
Throws:
null | DOMError |
---|
clearWatch(watchId:Int):Void
Removes the particular handler previously installed using watchPosition()
.