首页 文章

使用适用于Android的wikitude SDK获取用户位置

提问于
浏览
0

我目前正在使用wikitude sdk 4.0 for android并在我的应用程序中尝试多个POI的示例 . https://github.com/Wikitude/wikitude-sdk-samples/tree/master/3_PointOfInterest_3_MultiplePois

我得到了它实例化但坚持用户位置 .

我没有't understand how the user'的位置被这个Javascript拉https://github.com/Wikitude/wikitude-sdk-samples/blob/master/3_PointOfInterest_3_MultiplePois/js/multiplepois.js

1 回答

  • 1

    “AR.context.onLocationChanged = World.locationChanged;”在JS中做了魔术 .

    执行此行后,将在执行architectView的setLocation的每个Android / iOS本机调用时触发'World.locationChanged'(或任何其他给定的)函数 .

    查看示例应用程序中的LocationProvider实现,以获得一种非常基本的方法 . 对于最先进的位置提取,我建议您查看Google's Location Strategies .

    亲切的问候 .

相关问题