Web Appbuilder for ArcGIS (Development Edition) series Tutorial 3

Source: Internet
Author: User

The 2D and 3D in WAB (development version) are based on the ArcGIS for JavaScript API 3.20 online version and ArcGIS for JavaScript api 4.3 online. In the case of network anomaly, it is likely to encounter JS API loading slow or even wrong dilemma, resulting in the use of WAB (development version) to build applications. This section describes how to use the Portal for ArcGIS built-in JS API to replace the JS API referenced by WAB (development version). Get portal for ArcGIS built-in JS API Portal for ArcGIS built-in 2D JS API

The basic form of Portal for ArcGIS built-in 2D JS API access address is as follows:
"The machine name for the Portal for ArcGIS Machine"/arcgis/jsapi/jsapi

Take the author of this machine as an example, the actual access address is Http://zhangsai.esrichina.com/arcgis/jsapi/jsapi Portal for ArcGIS built-in 3D JS API

The basic form of Portal for ArcGIS built-in 3D JS API access address is as follows:
"The machine name for the Portal for ArcGIS Machine"/arcgis/jsapi/jsapi4

To the author of this machine for example, the actual access address is HTTP://ZHANGSAI.ESRICHINA.COM/ARCGIS/JSAPI/JSAPI4 2D under the JS API replacement

1 Open the Env.js file under "WAB Extract directory" \client\stemapp
2 Go to line 98th of env.js file, replace with portal for ArcGIS built-in 2D JS API

Before replacing:

Apiurl = '//js.arcgis.com/3.20 ';

After replacement:

Apiurl = '//zhangsai.esrichina.com/arcgis/jsapi/jsapi '; 3D the replacement of JS API

1 Open the Env.js file under "WAB Extract directory" \client\stemapp3d
2 Go to line 96th of env.js file, replace with portal for ArcGIS built-in 3D JS API

Before replacing:

Apiurl = '//js.arcgis.com/4.3 ';

After replacement:

Apiurl = '//zhangsai.esrichina.com/arcgis/jsapi/jsapi4 '; Restart WAB

After restarting the WAB, it automatically references the replacement JS API when you access the WAB build application again.

If you have deployed an offline 2D and 3D JS API, you can also refer directly to these offline deployment JS APIs.

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.