就下面这个例子,是在你们官网上站过来了。
在线预览 报502,编辑代码 报502,自己运行 报错
VM79:1 Uncaught TypeError: Cannot read property 'indexOf' of null
at initialize.createLayersByJson (eval at <anonymous> (SuperMap-8.1.1-15015.js:3), <anonymous>:1:602001)
at initialize.previewMapByJson (eval at <anonymous> (SuperMap-8.1.1-15015.js:3), <anonymous>:1:601438)
at initialize.eval (eval at <anonymous> (SuperMap-8.1.1-15015.js:3), <anonymous>:1:600728)
at eval (eval at <anonymous> (SuperMap-8.1.1-15015.js:3), <anonymous>:1:1792)
at Object.m.supermap_callbacks.(anonymous function) [as 63534407575816170] (eval at <anonymous> (https://www.supermapol.com/resources/api/libs/SuperMap-8.1.1-15015.js:1:1), <anonymous>:1:26250)
at 493.jsonp?callback=SuperMap.Util.RequestJSONP.supermap_callbacks[63534407575816170]§ionCount=1§ionIndex=0&jsonpUserID=1554795924128:1
<html>
<head>
<title>GetStarted</title>
<style>
.mapcontainer{
height: 600px;
}
</style>
<script src='http://www.supermapol.com/resources/api/libs/SuperMap.Include.js'></script>
</head>
<body>
<div id="map" class="mapcontainer"></div>
<script>
var url="http://www.supermapol.com";
var viewer=new SuperMap.Cloud.MapViewer(url,"map");
viewer.previewMapById(493);
</script>
</body>
</html>