-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.htm
More file actions
143 lines (90 loc) · 6.43 KB
/
Copy pathinstall.htm
File metadata and controls
143 lines (90 loc) · 6.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Install notes for the ArcGIS API for JavaScript™</title>
<link href="../../jsdoc.css" type="text/css" rel="stylesheet">
</head>
<body>
<body id="theBody" >
<div id="pageBanner">Install notes for the ArcGIS API for JavaScript™</div>
<div id="nstext"><H2 class=dtH4>Installing the ArcGIS API for JavaScript™ Library</H2>
<p>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/3.9/" 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.</p>
<p>For instructions on deploying the library on Linux please go <a href="install_linux.htm">here</a>. </p>
<p>Copy <code>\arcgis_js_api\library</code> and all its contents from the DVD to your Web server. In this example the files are copied to<p><code>C:\Inetpub\wwwroot\arcgis_js_api\library</code></p>
</p>
<h3>Install the Normal or Compact Build</h3>
<p>ArcGIS JSAPI 3.9 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 <a href='../../sdk/jshelp/inside_compactbuild.html'>documentation</a> for more details.</p>
<p>Your directions may differ depending on your server configuration or Web server, but the process is the same.</p>
<b>Configuration options for normal build:</b>
<ol>
<li>Open <b>C:\Inetpub\wwwroot\arcgis_js_api\library\3.9\3.9\init.js</b> in a text editor and search for the text <code>'[HOSTNAME_AND_PATH_TO_JSAPI]'</code>, and replace this text with <code>"<myserver>/arcgis_js_api/library/3.9/3.9/"</code></li>
<li>Open <b>C:\Inetpub\wwwroot\arcgis_js_api\library\3.9\3.9\js\dojo\dojo\dojo.js</b> in a text editor and search for the text <code>'[HOSTNAME_AND_PATH_TO_JSAPI]'</code>, and replace this text with <code>"<myserver>/arcgis_js_api/library/3.9/3.9/"</code></li>
</ol>
<b>Configuration options for compact build:</b>
<ol>
<li>Open <b>C:\Inetpub\wwwroot\arcgis_js_api\library\3.9\3.9compact\init.js</b> in a text editor and search for the text <code>'[HOSTNAME_AND_PATH_TO_JSAPI]'</code>, and replace each instance of this text with <code>"<myserver>/arcgis_js_api/library/3.9/3.9compact/"</code></li>
<li>Open <b>C:\Inetpub\wwwroot\arcgis_js_api\library\3.9\3.9compact\js\dojo\dojo\dojo.js</b> in a text editor and search for the text <code>'[HOSTNAME_AND_PATH_TO_JSAPI]'</code>, and replace this text with <code>"<myserver>/arcgis_js_api/library/3.9/3.9compact/"</code></li>
</ol>
<h3>Test the Install</h3>
Access the ArcGIS JavaScript library from your Web server using the following URL(s):
<p><code>http://<myserver>/arcgis_js_api/library/3.9/3.9/init.js</code></p> and <p><code>http://<myserver>/arcgis_js_api/library/3.9/3.9compact/init.js</code></p>
Test your install. You can use the following test code to validate your JSAPI library install.
<div class="detailSample">
<pre>
<!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/3.9/3.9/js/dojo/dijit/themes/tundra/tundra.css"/>
<link rel="stylesheet" type="text/css" href="http://<myserver>/arcgis_js_api/library/3.9/3.9/js/esri/css/esri.css" />
<script type="text/javascript" src="http://<myserver>/arcgis_js_api/library/3.9/3.9/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>
</pre>
</div>
<h3>Change the ArcGIS Services Directory "View In JavaScript" URL.</h3>
<p> The Services Directory allows you to view Map and Image services using the JavaScript API. Set the following values in the rest-config.properties file to use the local install:
<pre>
#JS API URLs
jsapi.arcgis=http://<server_name>/arcgis_js_api/library/3.9/3.9/js/
jsapi.arcgis.sdk=http://<server_name>/arcgis_js_sdk/sdk/
jsapi.arcgis.css=http://<server_name>/arcgis_js_api/library/3.9/3.9/js/dojo/dijit/themes/tundra/tundra.css
</pre>
<p>Finally make sure the import statement for the <code>esri.css</code> stylesheet is in the <ArcGIS Server Install Location>ArcGIS\Server\framework\runtime\tomcat\webapps\arcgis#rest\www\client\mapserver\mapserverJSAPI.jsp file.
<pre>
<style type="text/css">
@import "<%=jsapiArcgisCssUrl%>";
@import "<%=cpath%>/static/jsapi.css";
@import "<%=jsapiArcgisUrl%>/js/esri/css/esri.css";
</style>
</pre>
</p>
<P>View the <a href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000pw000000">Configuring the Rest API</a> help topic for more details. </p>
<H3 class=dtH4>Installing the ArcGIS JavaScript API SDK</H3>
<p>The ArcGIS JavaScript API SDK can be copied in its entirety to your Web server directory. This SDK is equivalent to the version found on the
<a href="https://developers.arcgis.com/en/javascript/" target="_blank">ArcGIS for Developers JavaScript</a> site.
<ol>
<li>Copy <code>\arcgis_js_api\sdk</code> and all its contents from the DVD to your Web server. In this example the files are copied to
<pre>C:\Inetpub\wwwroot\arcgis_js_api\sdk</pre>
</li>
<li>The start page is "index.html". If you chose to do so, you can rename this page.</li>
</ol>
</p>
</div>
</body>
</html>