试图从arcgis服务器中提取地图



我正试图使用Aptana IDE从arcgis服务器获取并显示地图。上面说我没有定义。

得到https://gistest2.xxx.xxx/arcgis/rest/info?f=json

200 OK 27ms TypeError:l为未定义

x) <p.dx)&amp;q_addFrameInfo(h,p);this.setExclusionArea(this.exclusionArea);这

这是除了我试图点击的URL之外的全部代码。

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <!--The viewport meta tag is used to improve the presentation and behavior of the samples
        on iOS devices-->
        <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
        <title>BGSU Memorial Trees Location</title>
        <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/dojo/dijit/themes/claro/claro.css">
        <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css">
        <script src="http://js.arcgis.com/3.10/">
        </script>
        <script>
        var map;
    require(["esri/map", "esri/layers/ArcGISTiledMapServiceLayer", "dojo/domReady!"],
    function (Map, ArcGISTiledMapServiceLayer ) {
    map = new Map("map", {               
        center: [-76.756, 40.241],
        zoom: 8
    });           
    var customBasemap = new ArcGISTiledMapServiceLayer(
    "https://XXX/");

    map.addLayer(customBasemap);
});
        </script>
    </head>
    <body class="claro">
                     <div align="center"><strong>BGSU Memorial Trees Listing   </strong><hr>
<i><a target="_self" href="listingtrees.html">Listing</a> | <a target="_self" href="locationtrees.html">Locations </a></i>
</div>
<br>
        <div id="map" >
        </div>

    </body>
</html>

非常感谢您的帮助。

提前感谢!

在ArcGISTiledMapServiceLayer的构造函数中,您必须指定ArcGIS平铺地图服务的URL。URL示例:

  http://myserver/arcgis/rest/services/map_service_name/MapServer

您指定的地址(arcgis/rest/info?f=json)是arcgis服务器rest服务的地址,但不指向Map服务。

最新更新