首页 / 浏览问题 / 云GIS / 问题详情
官网上的快速入门例子报错????
2EXP 2019年04月09日
就下面这个例子,是在你们官网上站过来了。
在线预览 报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]&sectionCount=1&sectionIndex=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>

1个回答

您好,您看的是哪个示例?如果想做入门的话可以看这个网站上的http://iclient.supermap.io/examples/classic/examples.html#map

5,668EXP 2019年04月09日
...