WebGis in parsing: geographic information system: | August more challenges
Geographic information system | August more challenges
This is the third day of my participation in the August Challenge. For details, see:August is more challenging
Vue locally deploys the arcgisAPI
- In ArcgisAPI websitedevelopers.arcgis.com/downloadsDownload the latest version of the ArcgisAPI offline package
- After downloading the decompression code, find your relative path (arcgis_js_v420_api\arcgis_js_api\javascript\4.20), find your two init.js files, replace baseUrl with your local path or server path, as shown in the figure: (Unlike before 4.16, the new ArcgisAPI deprecates the Dojo framework, so the URL configuration in Dojo will also need to be changed before 4.16.)
3. After the configuration is complete, start TomCat and put the API into webApp. Note that the web. XML under conf should be added to allow cross-domain commands, otherwise it will report cross-domain errors. Let’s configure the arcgisAPI just downloaded via NPM:
NPM install ArcGIS-js-api --save or NPM install ArcGIS-js-api or NPM I ArcGIS-js-apiCopy the code
- Node_modules \esri-loader\dist\umd\ esRI-loader. js/esRI-loader. js/esRI-loader. js/esRI-loader. js/esRI-loader. js/esRI-loader. js/esRI-loader. js
Open esri-loader.js to see what changes need to be made
- Replace the version number with 2.0
- Replace the online path to the local or server path
5. OK, the configuration here is almost OK, our arcgisAPI local deployment can be used, start TomCat, write a test page to test itWhen the page is opened, the map can be loaded normally as shown in the figure:
Thanks for watching, and if you have any questions, please leave them in the comments section