I don't mean to revive what appears to be a solved problem, but I am experiencing perhaps a similar issue.
HTTPS and Proxy
I was wondering if you had experienced any similar behavior when you had your issue?
Thanks,
Alex
Ah - answered my last question myself - I needed to wrap it in a esri.request.
var requestHandle = esri.request({ url:mapservice2 + "/" + layer.id + "?f=json", handleAs: "json", load: function (data) { console.debug(data) LayerDescriptions[layer.id] = data.description; dynamicMapServiceLayer.layerInfos[layer.id].copyrightText = data.copyrightText; }, }, { useProxy: true });
OK - I've had some spare time and found the issue.
I use this code
//return the layer descriptions and © text into arrays - we use this later for the info dialog to generate hyperlinks and © text dojo.forEach(dynamicMapServiceLayer.layerInfos, function (layer) { var restAPIServicePage = { url: mapservice2 + "/" + layer.id + "?f=json&token=uO3JarsebollockswxI9ExjTj_VE5IgAHr9YKPjoE3Mn00qipj9Baxjg1s0lm1c4c", callbackParamName: "callback", load: function (data) { LayerDescriptions[layer.id] = data.description; dynamicMapServiceLayer.layerInfos[layer.id].copyrightText = data.copyrightText; } }; dojo.io.script.get(restAPIServicePage); });
in my init function, to step throughmy layers and return the description into an array, which I use for layer specific hyperlinks in my ID task results.
As you see, I've had to hard code a token here as it appears to be this bit that doesn't go via the proxy, so fails to return anything
Is this the only realistic way of doing it?
Cheers
ACM
what is the lowest version of the API that the new proxy will work on? I have some code stuck at 3.0, which onlyu seems to pass the initial requests in - query tasks go direct to server.
<serverUrl url="http://servername/ArcGIS/rest" username="username" password="password", matchAll= "true" />
<?xml version="1.0" encoding="utf-8" ?><ProxyConfig allowedReferers="*" mustMatch="false"> <serverUrls> <serverUrl url="http://servername/ArcGIS/rest/services" username="username" password="password" /> </serverUrls> </ProxyConfig>
<?xml version="1.0" encoding="utf-8" ?> <ProxyConfig allowedReferers="http://applicationRootURL/" mustMatch="true">
<?xml version="1.0" encoding="utf-8" ?> <ProxyConfig allowedReferers="http://servername/" mustMatch="false"> <serverUrls> <serverUrl url="http://servername/arcgis/rest/services/test/emap2/MapServer" username="webmap" password="password" matchAll="true"/> </serverUrls>
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.