最近使用大疆智图生成了三维模型,想在高德三维地图上显示出来。最先尝试了.b3dm格式的,发现高德api加载一直不显示。后面决定试试.gltf,但是大疆智图没有这种格式,所以我把大疆智图.obj格式转换成.gltf,让人伤心的是转换之后并不能直接显示出来。中间有许多坑如该文章描述https://blog.csdn.net/LiAngels/article/details/114083044
文件目录结构如下,引入模型文件时不要忘了图片
gltf3D.html代码块
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="//a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css"/>
<title>glTF 模型</title>
<style>
html,
body,
#container {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
.cc {
position: absolute;
color: #000000;
bottom: 10px;
left: 10px;
}
</style>
<script>
delete window.AMap;
</script>
</head>
<body>
<div id