uni-app中通过renderjs应用 ArcGIS,ios真机运行时,在指定坐标点上添加的图片不显示,只能显示一个默认的黑点,而在ios手机浏览器上运行时是正常的。报错信息如下:[esri.views.2d.engine.webgl.mesh.templates.WGLTemplateStore] [mapview-invalid-resource]: Could not fetch requested resource at static/img/end.png。大概是指无法获取图片资源,不知道是为什么?在安卓手机真机运行时是可以的。有同学知道怎么解决吗?

天涯逐浪
- 发布:2020-03-26 19:15
- 更新:2021-06-24 18:15
- 阅读:3642

同问,楼主是如何在uniapp跑起来arcgis api for js的,这个库的脚本一大堆,我试了试在renderJS里用'esri-loader',虽然请求有了,但是界面是空白,请楼主能指点下迷津,谢谢了

从错误看是无法使用ajax加载本地的图片资源,尝试使用远程的图片,或者使用其他方式转成base64。
可以参考uni-app框架中的逻辑:https://github.com/dcloudio/uni-app/blob/master/src/core/view/components/canvas/index.vue
誓言1994
同问啊,兄弟,你解决了吗
2021-03-04 20:55