Arcgis Javascript代理

时间:2016-12-07 05:19:01

标签: javascript proxy arcgis arcgis-js-api

我正在尝试使用代理arcgis.My proxy.config是

<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*" mustMatch="false">
    <serverUrls>
        <serverUrl url="http://myownservice.com.tr" matchAll="false"/>                 
        <serverUrl url="http://services.arcgisonline.com/ArcGIS/rest/services" matchAll="false"/>
    </serverUrls>
</ProxyConfig>

和我的js代码:

urlUtils.addProxyRule({
    urlPrefix: "http://services.arcgisonline.com/ArcGIS/rest/services",
    proxyUrl: "http://localhost/Dotnet/proxy.ashx"
});

urlUtils.addProxyRule({
    urlPrefix: "http://myownservice.com.tr",
    proxyUrl: "http://localhost/Dotnet/proxy.ashx"
});

当我执行项目服务时.arcgis很好地获得代理。 就像这样:

http://localhost/Dotnet/proxy.ashx?http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tilemap/12/1528/2376/8/8

但我自己的服务不接受代理。

http://myownservice.com.tr:6080/arcgis/rest/info?f=json

0 个答案:

没有答案