2

The ArcGIS-javascript is ignoring my proxy.ashx when getting the tiles for a basemap-layer. In my case this tiles will come from "HERE". For this I need authentication-informations (AppID & AppCode) which should be set in the proxy. When not routed through the proxy, the requests will obviously fail.

I'm setting alwaysUseProxy to true, also I'm adding a rule for api.here.com. Roting the requests through the proxy worked with an earlier version (something like 1.3 or 1.4) and isn't working in the current version 3.13. Everything would be fine when the requests would be routed over the proxy.

When looking via console into the esriConfig alwaysUseProxy is true and also the rule exists. Any ideas what could cause the problem ?

PS: for getting the here-tiles I wrote an own HERE-layer-object. It's inheriting from the TiledMapServiceLayer providing a new constructor and a new getTileUrl-function. Just for information. I don't think that the problem lies there.

2
  • Looking at the network calls in your browser, where do the calls to your HERE layer go? Are you sure the base URL matches the proxy rule?
    – raykendo
    Commented Jun 17, 2015 at 14:13
  • Yes I'm sure the base url matches the proxy-rule. Since the requests for the automatic loaded basemap goes to "${number}.base.maps.api.here.com" where ${number} can be 1-4. Also creating rules for all the URLs did not work and would get to much when using other basemaps (I'm offering up to 4 or 5 different basemaps in the app). The only static part is maps.api.here.com. Anyway this rule-topic doesn't really matter since using "AlwaysUseProxy" sould automatically route everything to the proxy. Defining rules just was a try to get this working.
    – Onsokumaru
    Commented Jun 19, 2015 at 7:02

1 Answer 1

1

I couldn't identify something like this in the layers provided by Esri, but since the used layer is in my hands I decided to care for myself about using the proxy or not. I added following snippet in the getTileUrl-function:

        if (esriConfig.defaults.io.alwaysUseProxy === true) {
            url = esriConfig.defaults.io.proxyUrl + "?" + url;
        }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.