We have setup a local server hosting the ArcGIS server software (10.1). We installed the ArcGIS JavaScript API on the same local server. Our goal is to supply maps when the client has no internet connection, only a local area connection.

When we run the client (i.e. using the JavaScript API from the local server), we can see that all of the java script files are pulled from the local server. However, once our java script code calls new esri.Map, we see that the javascript code starts to pull map data from http://services.arcgisonline.com.

I looked at the C:\ArcGIS\JavaScriptAPI33\arcgis_js_v33_api\library\3.3\jsapicompact\init.js code (this is where it resides on our local ArcGIS server) and I see many occurrences of http://services.arcgisonline.com. I am thinking I need to change all of these occurrences to be the local server but this was not a step in the installation instructions.

How can we prevent the JavaScript from going to the internet for any files (map data, javascript data, css, etc)?

I understand that the JavaScript is the controlling code that makes this happen but I thought that Esri would have handled that in their JavaScript logic.


I followed only the steps given in the readme (I have changed nothing else). As I said, all the JavaScript files come from the local server. Once I call "new esri.Map" in our java script code, I see the following "http gets" to services.arcgisonline.com:

 1. services.arcgisonline.com/ArcGIS/rest/info?f=json
 2. services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&callback=dojo.io.script.jsonp_dojoIoScript1._jsonpCallback
 3. services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer?f=json&callback=dojo.io.script.jsonp_dojoIoScript2._jsonpCallback

You asked me "do we have any basemap or anything else in our map that comes from ArcGIS online?" My answer is no. But clearly (unless there is an ArcGIS bug) something is not working as we want it to because it ends up going to services.arcgisonline.com.

As your response is implying, it seems I do not understand the basemap values since I am using hybrid for the local server. Sounds like I need a different value there.

Here is the code snippet:

var l_Options =
zoom: 10,
sliderStyle: "small",
basemap: "hybrid",
infoWindow: g_Popup,
nav: true

map = new esri.Map("map_canvas", l_Options);
dojo.connect(map, "onLoad",
    var l_ArcGISTiledMapServiceLayer = null;

    switch (g_strMappingEngine)
    case 'esriLocalServer':
        /* ????
        l_ArcGISTiledMapServiceLayer =
        new esri.layers.ArcGISTiledMapServiceLayer(
        ???? */
        l_ArcGISTiledMapServiceLayer =
        new esri.layers.ArcGISDynamicMapServiceLayer(
    case 'esriInternet':
        l_ArcGISTiledMapServiceLayer =
        new esri.layers.ArcGISTiledMapServiceLayer(


3 Answers 3


You are specifying that the map should be loaded with the "hybrid" map type (in your l_Options object), which is is one of the available map services hosted at services.arcgisonline.com/ArcGIS/rest/services.

In order to remove the dependency on ESRI services, you should not specify a basemap, and instead load your own layers from your own instance of ArcGIS Server.


To amplify previous answers : In the options you are passing with new esri.Map, you are passing in basemap: "hybrid". If you totally omit this parameter, your browser will not make any calls back to services.arcgisonline.com to pull map data. You can then load local map services without needing to access the Internet.

Would agree that this is not obvious from the ESRI api which doesn't provide any examples of using local only resources.


I am experiencing the same issue with v3.24 of the API.
The API has been hosted locally as per the instructions in "install_api_windows.html", but still see calls going to https://js.arcgis.com.
enter image description here I am not even calling any basemap from ESRI and using all of the local published map services.

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.