kml文件发布完之后,调用时候,加载不出来,请问什么原因?

把源代码粘出来了,只修改了kml的地址,没有做其他改变,调用时候,这个图层加载不出来,是什么原因呢?
 <html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
  <title>KMLLayer - 4.6</title>

  <style>
    html,
    body,
    #viewDiv {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
    }
  </style>

  <link rel="stylesheet" href="https://js.arcgis.com/4.6/esri ... gt%3B
  <script src="https://js.arcgis.com/4.6/%26q ... gt%3B

  <script>
      require([
      "esri/Map",
      "esri/views/MapView",
      "esri/layers/KMLLayer",
      "esri/widgets/ScaleBar",
      "dojo/domReady!"
    ], function (
      Map,
      MapView,
      KMLLayer,
      ScaleBar
    ) {

        var layer = new KMLLayer({
            url: "http://localhost:6080/arcgis/r ... ot%3B // lane closures from California Dept of Transportation
        });

        var map = new Map({
            basemap: "topo",
            layers: [layer]
        });

        var view = new MapView({
            container: "viewDiv",
            map: map,
            center: [-120, 38],
            zoom: 6
        });

        var scalebar = new ScaleBar({
            view: view
        });
        view.ui.add(scalebar, "bottom-left");

    });
  </script>
</head>
<body></body>
</html>
已邀请:

要回复问题请先登录注册