室内地图无法初始化
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>
页:
[1]