[英]How to use navigator.geolocation.getCurrentPosition in Haxe?
Maybe somebody can tell me how I will use navigator.geolocation.getCurrentPosition in Haxe. 也许有人可以告诉我如何在Haxe中使用navigator.geolocation.getCurrentPosition。 In JavaScript this method needs 2 callback functions (success/error) and an option object.
在JavaScript中,此方法需要2个回调函数(成功/错误)和一个选项对象。 In the Haxe version of this method, the successCallback is typed as Position and the errorCallback is typed as PositionError.
在此方法的Haxe版本中,将successCallback键入为Position,将errorCallback键入为PositionError。 How do I use getCurrentPosition method in Haxe?
如何在Haxe中使用getCurrentPosition方法?
In the Haxe version of this method, the successCallback is typed as Position and the errorCallback is typed as PositionError.
在此方法的Haxe版本中,将successCallback键入为Position,将errorCallback键入为PositionError。
This is inaccurate. 这是不准确的。 The documentation states :
该文档指出 :
successCallback:Position ‑> Void
Position
Position
类型的参数的回调 ?errorCallback:PositionError ‑> Void
PositionError
PositionError
?options:PositionOptions
PositionOptions
PositionOptions
Here's a runnable example: http://try.haxe.org/#5EE17 这是一个可运行的示例: http : //try.haxe.org/#5EE17
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.