W3cubDocs

/Haxe JavaScript

Geolocation

package js.html

@:native("Geolocation") Available on js

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:

Methods

clearWatch (watchId:Int):Void

Removes the particular handler previously installed using watchPosition().

getCurrentPosition (successCallback:Position ‑> Void, ?errorCallback:PositionError ‑> Void, ?options:PositionOptions):Void

Throws:

null DOMError

watchPosition (successCallback:Position ‑> Void, ?errorCallback:PositionError ‑> Void, ?options:PositionOptions):Int

Throws:

null DOMError

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Geolocation.html