无法使用代理添加esri传单平铺图层

时间:2017-10-01 06:37:07

标签: proxy leaflet layer esri

我需要添加动态和平铺图层以使用代理进行映射。 我使用以下代码:

  var tiled = L.esri.tiledMapLayer({
        url: 
  "https://<domain>/arcgs/rest/services/basemaps/<name1>/MapServer"
        ,            
        proxy: 'proxy/proxy.ashx',
        useCors:false
    }).addTo(map);

    var gasStations = L.esri.dynamicMapLayer({
        url: 
    "https://<domain>/arcgs/rest/services/dynamic/gas_stations/MapServer"
       ,
        proxy: 'proxy/proxy.ashx',
        useCors: false
    }).addTo(map);

动态图层被添加到地图中,但是平铺图层没有,我在以下类型的控制台中收到很多消息:

Failed to load resource: the server responded with a status of 499 ()

<domain>/arcgs/rest/services/basemaps/<name1>/MapServer/tile/<level>/<x>/<y>

当我点击其中一个链接时,我会进入新页面:

HTTP Status 499 - Token Required

所以我认为这个问题在代理中,但我不明白为什么它适用于动态图层,而不适用于平铺的缓存图层。

0 个答案:

没有答案