微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法使用 AR.js 使用 GPS 位置显示框

如何解决无法使用 AR.js 使用 GPS 位置显示框

我只想使用 gps 坐标在我的头顶显示一个框,但它没有按预期工作,我决定使用模拟纬度经度属性来测试它是否是我的硬编码 gps 坐标的问题,但我仍然不能让它起作用。 我的代码如下

<!DOCTYPE html>
<html>
  <head>
    <Meta charset="utf-8" />
    <Meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>GeoAR.js demo</title>
    <script src="https://aframe.io/releases/1.1.0/aframe.min.js"></script>
    <script src="https://unpkg.com/aframe-look-at-component@0.8.0/dist/aframe-look-at-component.min.js"></script>
    <script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
    
  </head>

  <body style="margin: 0; overflow: hidden;">
    <a-scene
      vr-mode-ui="enabled: false"
      embedded
      arjs="sourceType: webcam; debugUIEnabled: false;"
    >
    
    <a-Box scale="20 20 20" position="0 50 0" gps-entity-place="longitude: 23.55823; latitude: 87.31361;" color="orange"></a-Box>
    
    <a-camera gps-camera="simulateLatitude: 23.55822; simulateLongitude: 87.31360;simulatealtitude: 0.5" rotation-reader> </a-camera>
    </a-scene>
  </body>
</html>

谁能帮我看看为什么它不起作用?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。