Original: ArcGIS API for JavaScript development environment Setup and first Instance demo
ESRI has now released the latest ArcGIS Server for JavaScript API v3.9, which provides richer and more powerful features.
First, pre-installation preparation
1, ArcGIS Server for JavaScript API Span style= "Font-size:14px;color: #333333;" > versions: http://support.esrichina-bj.cn/2011/0223/960.html we choose to download the latest " arcgis API for JavaScript 3.9:library | SDK "
2, download to the local file as shown:
3, unzip the above 2 a zip Compress the package as shown in:
4. Ensure that you have installed the local IIS , if not, please refer to the following address to configure:
Http://jingyan.baidu.com/article/8275fc8694360146a03cf6c3.html
Ii.API and SDK Local IIS configuration deployment
1. Open C:\Inetpub\wwwroot folder.
2, the Arcgis_js_v39_sdk folder directly copied to C:\Inetpub\wwwroot, into C:\INETPUB\WWWROOT\ARCGIS_JS_V39_SDK,
As shown in the following:
3. Copy the Library folder under the Arcgis_js_v39_api\arcgis_js_api directory to
C:\inetpub\wwwroot\arcgis_js_v39_sdk\arcgis_js_api down, into
C:\inetpub\wwwroot\arcgis_js_v39_sdk\arcgis_js_api\ Library as shown in the following:
4. Open IIS, as shown in, browse install.htm, as shown in the initial deployment success:
5. Find C:\inetpub\wwwroot\arcgis_js_v39_sdk\arcgis_js_api\library\3.9\ 3.9\init.js file, open with Notepad or editplus; ctrl+f key combination Lookup [Hostname_and_path_to_jsapi] , and replaced by <myserver>/arcgis_js_v39_sdk/arcgis_js_api/library/3.9/3.9/, where <myserver> is the machine name or machine IP, note that there is no HTTP prefix. can be localhost or 192.168.11.195, here I am using localhost, as shown in:
6. Find C:\inetpub\wwwroot\arcgis_js_v39_sdk\arcgis_js_api\library\3.9\ 3.9\js\dojo\dojo\dojo.js file, use Notepad or editplus to open, ctrl+f key combination to find [Hostname_and_path_to_jsapi], and replace with <myserver>/arcgis_js_v39_sdk/arcgis_js_api/library/3.9/3.9/ , where <myserver> for machine name or machine IP, no HTTP prefix. can be localhost or 192.168.11.195, here I am using localhost, as shown in:
7, as shown, find the 3.9compact folder, next 8 9 5 6 ) exactly the same, just 8 9 3.9compact folder, and 5 6 3.9 folder as shown in:
8,C:\inetpub\wwwroot\arcgis_js_v39_sdk\arcgis_js_api\library\3.9\3.9compact\init.jsfiles, using Notepad or EditPlusOpen the ctrl+f.key combination Lookup [Hostname_and_path_to_jsapi], and replace with<myserver>/arcgis_js_v39_sdk/arcgis_js_api/library/3.9/3.9compact/,which<myserver>for machine name or machineIP, note that there is nohttpprefix. It could be localhost .or 192.168.11.195, here I am usinglocalhostas shown in the following:
9.Find C:\inetpub\wwwroot\arcgis_js_v39_sdk\arcgis_js_api\library\3.9\3.9compact\js\dojo\dojo\ Dojo.js files, using Notepad or EditPlusOpen, ctrl+f.combine keys to find [Hostname_and_path_to_jsapi]and replace with <myserver>/arcgis_js_v39_sdk/arcgis_js_api/library/3.9/ 3.9compact/, of which <myserver>for machine name or machineIP, withouthttpprefix. It could be localhost .or 192.168.11.195, here I am usinglocalhostas shown in the following:
10, after the above 9 steps, we completed the ArcGIS API for JavaScript on -premises deployment .
Third, the example demo run
1, open VS2012, create a new blank Web project, add a index.html file, the file content as shown:
The CSS and JS files used here are the paths on the local server that are configured in the previous steps.
<! DOCTYPE html>
2. Run the index.html page as shown:
===========================================================================
If you find it helpful, scan for support:
ArcGIS API for JavaScript development environment Setup and first Instance demo