高德开发者论坛
标题:
室内地图无法初始化
[打印本页]
作者:
amapAOutQed93
时间:
2018-5-24 10:53
标题:
室内地图无法初始化
Offset is outside the bounds of the DataView
按照demo初始化的例子。一直报错,是因为个人的key没有访问权限吗
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="http://indoorweb.amap.com/indoormap-1.2.css" />
<style>
#container {width:800px; height: 800px; }
</style>
</head>
<body>
<div id="container"></div>
<script type="text/javascript" src="http://indoorweb.amap.com/indoormap-1.2.js"></script>
<script type="text/javascript">
//示例 初始化地图
var map = new Indoor.Map('container',{
key:'个人的api key',
buildingId:'B000A856LJ'
});
//由于地图数据使用了异步加载,为避免出错请把所有的逻辑放在mapready事件内
map.once('mapready',function(){
console.log(map.getFloor());
})
</script>
</body>
</html>
复制代码
欢迎光临 高德开发者论坛 (https://lbsbbs.amap.com/)
Powered by Discuz! X3.2