ArcGIS API for Javascript 2.X offline deployment (take 2.6 as an example)

Source: Internet
Author: User

(Original post address http://www.th7.cn/Program/net/2011/12/22/51908.shtml)

1. First download the latest API: arcgis_js_v26_api.zip and SDK: arcgis_js_v26_sdk.zip on the official website ArcGIS API for JavaScript download page (account required;

 

2. decompress the downloaded unzip and arcgis_js_v26_sdk.zip files respectively, and copy the arcgis_js_api folder in the respective folders to C:/inetpub/wwwroot, because the copied folders are named arcgis_js_api, therefore, when copying the second folder, select overwrite;

 

3. Copy the esri. js file under C:/inetpub/wwwroot/arcgis_js_api/library/2.6/jsapi/js/esri.

C:/inetpub/wwwroot/arcgis_js_api/library/2.6/jsapi/js/dojo/two files under dojo. xd. js and dojo. xd. js. uncompressed. js

Replace [HOSTNAME_AND_PATH_TO_JSAPI] With djConfig. url + "/arcgis_js_api/library/2.6/jsapi/(note that there is no colon missing). Similarly

C:/inetpub/wwwroot/arcgis_js_api/library/2.6/esri. js file under jsapicompact/js/esri

C:/inetpub/wwwroot/arcgis_js_api/library/2.6/jsapicompact/js/dojo/two files under dojo. xd. js and dojo. xd. js. uncompressed. js

Replace [HOSTNAME_AND_PATH_TO_JSAPI] With djConfig. url + "/arcgis_js_api/library/2.6/jsapicompact/(note the colon );

 

4. in IIS, convert arcgis_js_api to an application, and add: default. ashx in the default document;

 

5. var djConfig = {parseOnLoad: true, url: "localhost"}; add a url attribute. The url is the IP address of the server where the api is located.

Will http://serverapi.arcgisonline.com/jsapi/arcgis? Replace v = 2.6 With http: // localhost/arcgis_js_api/library/2.6/jsapi localhost. Replace it with the IP address of the server where the api is located.

Replace http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dijit/themes/claro/claro.css

Http: // localhost/arcgis_js_api/library/2.6/jsapi/js/dojo/dijit/themes/claro/claro.css localhost should be changed to the IP address of the server where the api is located;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.