Arcgis For Js Api 初始化后加载init.js报错

寇剑 发布于 2016/01/25 11:18
阅读 1K+
收藏 0

最近学习Arcgis For Js 本地配置完毕后,可以在IIS中访问到js,但是运行的时候init.js就开始报错了,错误如图,有人遇见过这个问题吗?

运行网页代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        @import "http://localhost/arcgis_js_api/library/3.15/3.15/dijit/themes/tundra/tundra.css";

    </style>

    <script type="text/javascript">djConfig = { parseOnLoad:true }</script>
    <script type="text/javascript" src="http://localhost/arcgis_js_api/library/3.15/3.15/init.js"></script>
    <script type="text/javascript">
        dojo.require("esri.map");
        var myMap;
        function init() {
            myMap = new esri.Map("arcgisDiv");
            var myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://cache1.arcgisonline.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer");
            myMap.addLayer(myTiledMapServiceLayer);
            myMap.setZoom(4);
        }
        dojo.addOnLoad(init);
    </script>
</head>
<body class="tundra">
<div id="arcgisDiv" style="width:900px; height:600px; border:1px solid #000;"></div>
</body>
</html>




错误如下



加载中
返回顶部
顶部