我使用照片球面查看器来显示全景照片,就像facebook所做的那样,并且有一些问题。
这是我的密码:
这是我的密码:
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8.1.3/dist/polyfill.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/uevent@2.0.0/browser.js"></script>
<script src="https://cdn.jsdelivr.net/npm/three@0.115.0/build/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.css">
<div id="photosphere"></div>
<script>
new PhotoSphereViewer.Viewer({
panorama: 'https://terrafrost.sfo2.digitaloceanspaces.com/20200618_131549.jpg',
container: 'photosphere',
caption: 'Parc national du Mercantour <b>© Damien Sorel</b>',
loadingImg: 'https://terrafrost.sfo2.cdn.digitaloceanspaces.com/photosphere-logo.gif',
defaultLat: 0.3,
touchmoveTwoFingers: true,
mousewheelCtrlKey: true,
});
</script>当我运行这段代码时,会遇到JS控制台中的错误:
对于我做错了什么或者我需要做什么有什么想法吗?
谢谢!
发布于 2021-12-11 16:51:05
你的全景文件不是公开的,所以我不能给出一个完整的答案。但是错误说,嵌入的XMP数据是不连贯的。可以使用useXmpData: false选项禁用XMP解析。
有关XMP数据的更多详细信息,请参见https://photo-sphere-viewer.js.org/guide/cropped-panorama.html。
https://stackoverflow.com/questions/66038972
复制相似问题