在 Titanium 地图视图中关注用户当前位置?
我的 Titanium 项目中有一个 Mapview。我可以让地图在加载时关注特定的纬度和经度,但我似乎无法让它在加载时关注用户的 currentLocation?代码是什么?
谢谢。
I have a Mapview in my Titanium project. I can get the map to focus on a specefic latitude and longitude on load, but I can't seem to get it to focus on users currentLocation on load? What is the code for that?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 getCurrentPosition 函数获取当前位置然后将焦点映射到该位置。
这是一个例子:
You can get your current location using getCurrentPosition function and then focus map to this location.
Here is an example: