Select to view content in your preferred language

Why won't my ArcGIS API library download work on my local server?

4629
5
Jump to solution
01-23-2015 01:24 PM
ChrisSergent
Deactivated User

After losing internet connection today, I decided to download the ArcGIS API for JavaScript Library 3.13. Our server is maps.decaturil.gov. I also tried the server name as well. I have the files in the folder that the documentation displays, but I receive an error telling that the files can not be found. What am I doing wrong?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
ChrisSergent
Deactivated User

The issue that I ran into was that in IIS7 even thought I copied the folder into the correct folder, I still needed to add a virtual directory for thearcgis_js_api\library\3.12\3.12. I usually don't mark my questions as answered but since we figured it out I shall this time.

View solution in original post

0 Kudos
5 Replies
khairulamri
Deactivated User

Hi Chris,

have you changed init.js and dojo.js on your API to your host ?

here is the example

init.js.png

after that try to access your api on browser like this : http://yourhost/js/library/3.12/3.12/init.js‌ you will get js script on browser.

check all configuration correctly, create simple app like this :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Simple Map</title>
    <link rel="stylesheet" type="text/css" href="http://yourhost/js/library/3.12/3.12/dijit/themes/tundra/tundra.css"/>
    <link rel="stylesheet" type="text/css" href="http://yourhost/js/library/3.12/3.12/esri/css/esri.css" />
    <script type="text/javascript" src="http://yourhost/js/library/3.12/3.12/init.js"></script>
    <script type="text/javascript">
      dojo.require("esri.map");
      function init() {
        var myMap = new esri.Map("mapDiv");
        //note that if you do not have public Internet access then you will need to point this url to your own locally accessible cached service.
        var myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer");
        myMap.addLayer(myTiledMapServiceLayer);
      }
      dojo.addOnLoad(init);
    </script>
  </head>
  <body class="tundra">
    <div id="mapDiv" style="width:900px; height:600px; border:1px solid #000;"></div>
  </body>
</html>

good luck

0 Kudos
ChrisSergent
Deactivated User

Yes, I tried both the server name and the URL for the server.

0 Kudos
KyleDixon
Deactivated User

Paste the URL to the init.js or any other js file in your browser to confirm the path is correct.

You should see the JavaScript.

Like this: https://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.7

0 Kudos
ChrisSergent
Deactivated User

Thanks, Esri is helping me now. They said that everything I am doing is correct. I will post the outcome here.

0 Kudos
ChrisSergent
Deactivated User

The issue that I ran into was that in IIS7 even thought I copied the folder into the correct folder, I still needed to add a virtual directory for thearcgis_js_api\library\3.12\3.12. I usually don't mark my questions as answered but since we figured it out I shall this time.

0 Kudos