Reputation: 11
Maybe somebody can tell me how I will use navigator.geolocation.getCurrentPosition in Haxe. In JavaScript this method needs 2 callback functions (success/error) and an option object. In the Haxe version of this method, the successCallback is typed as Position and the errorCallback is typed as PositionError. How do I use getCurrentPosition method in Haxe?
Upvotes: 1
Views: 127
Reputation: 15623
In the Haxe version of this method, the successCallback is typed as Position and the errorCallback is typed as PositionError.
This is inaccurate. The documentation states:
successCallback:Position ‑> Void
Position
?errorCallback:PositionError ‑> Void
PositionError
?options:PositionOptions
PositionOptions
Here's a runnable example: http://try.haxe.org/#5EE17
Upvotes: 1