ArcGIS API for JavaScript 4.X本地部署教程
19 个评论
遇到放大缩小按钮不能整除显示的问题,按照文章所述在iis在加了那些东西,还是出不来图片。
有报错呀,如下:Access to Font at 'http://localhost/arcgis_js_v45_api/arcgis_js_v45_api/arcgis_js_api/library/4.5/esri/themes/base/icons/fonts/CalciteWebCoreIcons.ttf?cu4poq' from origin 'http://localhost:6964' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:6964' is therefore not allowed access.
MyFrist4X.html:1 Access to Font at 'http://localhost/arcgis_js_v45_api/arcgis_js_v45_api/arcgis_js_api/library/4.5/esri/themes/base/icons/fonts/CalciteWebCoreIcons.woff?cu4poq' from origin 'http://localhost:6964' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:6964' is therefore not allowed access. The response had HTTP status code 404.
MyFrist4X.html:1 Access to Font at 'http://localhost/arcgis_js_v45_api/arcgis_js_v45_api/arcgis_js_api/library/4.5/esri/themes/base/icons/fonts/CalciteWebCoreIcons.woff?cu4poq' from origin 'http://localhost:6964' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:6964' is therefore not allowed access. The response had HTTP status code 404.
按照文章的步骤一步步操作了(api版本是4.5,采用http协议),dojo.js和init.js都可以正常访问。测试的时候依然报错:dojo_zh-cn.js Failed to load resource: net::ERR_NAME_NOT_RESOLVED。
https://www.example.com/arcgis_js_api/library/4.5/dojo/dojo.js
输入这个后,看不到代码啊!出现的是example domain。。。
怎么解决啊?
输入这个后,看不到代码啊!出现的是example domain。。。
怎么解决啊?
http://www.cnblogs.com/tracine0513/p/8779437.html。这个可以
我能访问http://localhost/arcgis_js_api/library/4.5/dojo/dojo.js,但是例子用不起来,打开浏览器什么也显示不出来。其中,layer用的是在线"http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer"
dojo_zh-cn.js和MapView.js报404,
Request URL: http://localhost/arcgis_js/api/library/4.3/4.3/esri/views/MapView.js
Request Method: GET
Status Code: 404 Not Found
Remote Address: [::1]:80
Referrer Policy: no-referrer-when-downgrade
Request URL: http://localhost/arcgis_js/api/library/4.3/4.3/dojo/nls/dojo_zh-cn.js
Request Method: GET
Status Code: 404 Not Found
Remote Address: [::1]:80
Referrer Policy: no-referrer-when-downgrade
Request URL: http://localhost/arcgis_js/api/library/4.3/4.3/esri/views/MapView.js
Request Method: GET
Status Code: 404 Not Found
Remote Address: [::1]:80
Referrer Policy: no-referrer-when-downgrade
Request URL: http://localhost/arcgis_js/api/library/4.3/4.3/dojo/nls/dojo_zh-cn.js
Request Method: GET
Status Code: 404 Not Found
Remote Address: [::1]:80
Referrer Policy: no-referrer-when-downgrade
http://server.arcgisonline.com/arcgis/rest/services/NGS_Topo_US_2D/MapServer,服务地址是这个吧
Uncaught ReferenceError: require is not defined这个错误是为什么呢?我本地部署了API之后,按照网上的方法可以打开dojo.js,不是说明已经配置成功了,可是还是报这个错,如果我在html代码种引用dojo.js,报的错更多
补充一下相对路径的部署方式吧?
为什么我所有显示都是正常,会报错这个啊
MapView.js:708 GET http://localhost/4.9/esri/themes/base/fonts/avenir-next/Avenir_Next_W00_400.woff2 net::ERR_ABORTED 404 (Not Found)
MapView.js:708 GET http://localhost/4.9/esri/themes/base/fonts/avenir-next/Avenir_Next_W00_400.woff2 net::ERR_ABORTED 404 (Not Found)
GET http://localhost/4.9/esri/themes/base/fonts/avenir-next/Avenir_Next_W00_400.woff net::ERR_ABORTED 404 (Not Found)
需要添加什么name类型吗
需要添加什么name类型吗
最新的4.22版本文件夹里面没有dojo.js文件
老师您好,我用iis部署的3.3版本api,部署以后测试加载2d地图一直显示空白,我又下了您教程中的4.14,可以正常显示,想请教您一下这是为什么?