View the ArcGIS JavaScript API license agreement for licensing details before installing the ArcGIS JavaScript API. The instructions below assume that you are installing the ArcGIS JavaScript API library in the following location on an IIS Web Server, "http://<myserver>/arcgis_js_api/library/2.0/arcgis/" where <myserver> is the domain name of your Web site. After copying files to your Web server, you will need to edit some files to include the URL to the server and directory that you are planning to install to.
ArcGIS JSAPI 2.0 contains two builds--a normal build and a compact build. The compact build removes the Dojo Dijit dependancy and minimizes the non-essential ArcGIS JSAPI classes. Please see the documentation for more details.
Your directions may differ depending on your server configuration or Web server, but the process is the same.
\arcgis_js_api\library and all its contents to your Web server. In this example the files are copied to
C:\Inetpub\wwwroot\arcgis_js_api\library
Note: The SDK is in a separate zip file, if you need the API Reference, samples and help topics, see the section below on 'Installing the ArcGIS JavaScript API SDK.
Configuration options for normal build:
C:\Inetpub\wwwroot\arcgis_js_api\library\2.0\arcgis\js\esri\esri.js in a text editor.'[HOSTNAME_AND_PATH_TO_JSAPI]', and replace all instances of this text with "<myserver>/arcgis_js_api/library/2.0/arcgis/"C:\Inetpub\wwwroot\arcgis_js_api\library\2.0\arcgis\js\dojo\dojo\dojo.xd.js in a text editor. '[HOSTNAME_AND_PATH_TO_JSAPI]', and replace all instances of this text with '<myserver>/arcgis_js_api/library/2.0/arcgis/'C:\Inetpub\wwwroot\arcgis_js_api\library\2.0\arcgis\js\dojo\dojo\dojo.xd.js.uncompressed.js in a text editor. '[HOSTNAME_AND_PATH_TO_JSAPI]', and replace this text with '<myserver>/arcgis_js_api/library/2.0/arcgis/'Configuration options for compact build:
C:\Inetpub\wwwroot\arcgis_js_api\library\2.0\arcgis_compact\js\esri\esri.js in a text editor.'[HOSTNAME_AND_PATH_TO_JSAPI]', and replace with "<myserver>/arcgis_js_api/library/2.0/arcgis_compact/"C:\Inetpub\wwwroot\arcgis_js_api\library\2.0\arcgis_compact\js\dojo\dojo\dojo.xd.js in a text editor. '[HOSTNAME_AND_PATH_TO_JSAPI]', and replace with '<myserver>/arcgis_js_api/library/2.0/arcgis_compact/'C:\Inetpub\wwwroot\arcgis_js_api\library\2.0\arcgis_compact\js\dojo\dojo\dojo.xd.js.uncompressed.js in a text editor. '[HOSTNAME_AND_PATH_TO_JSAPI]', and replace with '<myserver>/arcgis_js_api/library/2.0/arcgis_compact/'For example, to deploy on IIS you need to modify the default content page to include Default.ashx. Steps include:
Note:In IIS7, you may still get 403 or 404 errors after deploying the handler. In these cases you may need to enable the ASP.NET feature. In Windows 7, you can enable this feature by navigating to Control Panel > Programs and Features > Turn Windows Features on or off. Then expand Internet Information Services > World Wide Web Services > Application Development Features then enable ASP.NET.
http://<myserver>/arcgis_js_api/library/2.0/arcgis/ and http://<myserver>/arcgis_js_api/library/2.0/arcgis_compact/
<Installation Location>\DeveloperKit\Help\REST\index.html. On UNIX and Linux, the location is http://<myserver>:8399/<instance>/sdk/rest/index.html where myserver is your server name and instance is the instance name (arcgis is the default).
rest.config are <ArcGIS> and <ArcGISCSS>. Replace serverapi.arcgisonline.com with your server domain name.
rest-config.properties are jsapi.arcgis and jsapi.arcgis.css. Replace serverapi.arcgisonline.com with your server domain name.
<!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://<myserver>/arcgis_js_api/library/2.0/arcgis/js/dojo/dijit/themes/tundra/tundra.css">
<script type="text/javascript" src="http://<myserver>/arcgis_js_api/library/2.0/arcgis/"></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 accesible 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>
http://help.arcgis.com/en/webapi/javascript/arcgis/
\arcgis_js_api\sdk and all its contents to your Web server. In this example the files are copied to
C:\Inetpub\wwwroot\arcgis_js_api\sdk