随笔分类 -  ArcGIS

摘要:原因 使用html2canvas、domtoimage进行截图时,会出现地图面板是空白的情况,报错如下: #1 133ms Unable to clone WebGL context as it has preserveDrawingBuffer=false <canvas style=​"widt 阅读全文
posted @ 2024-07-03 14:28 ZerlinM 阅读(270) 评论(0) 推荐(0)
摘要:实现效果 代码如下 const mapView = Global.map let trackLayer = new GraphicsLayer() let moveLayer = new GraphicsLayer() mapView.map.addMany([trackLayer, moveLay 阅读全文
posted @ 2023-09-20 16:41 ZerlinM 阅读(380) 评论(0) 推荐(0)
摘要:实现效果 代码如下 ToolBox.vue <template> <a-popover trigger="click"> <a-button>工具箱</a-button> <template #content> <a-button type="text" class="btn" @click="() 阅读全文
posted @ 2023-09-20 13:02 ZerlinM 阅读(677) 评论(0) 推荐(0)
摘要:实现效果 代码如下 const setPoint = () => { const data = [ { id: 11, poi: [120.28985, 31.54225], name: '金塘泵站' }, { id: 22, poi: [120.28985, 31.54725], name: '朝 阅读全文
posted @ 2023-09-19 18:01 ZerlinM 阅读(268) 评论(0) 推荐(0)
摘要:在地图做面积测量时竟然出现了负值,查阅资料后发现: ArcGIS默认顺时针图形为正,手工画polygon的时候不管怎么画结果都是顺时针的。所以一般负值的出现是转换过程出现问题,polygon是由ring组成的,ring则是有更小的segement(line,circularArc,elliptica 阅读全文
posted @ 2023-09-19 13:21 ZerlinM 阅读(2343) 评论(0) 推荐(0)
摘要:1、在视图mapView 上添加的点线面 // 删除所有 mapView.graphics.removeAll(); // 删除一个 const pointGraphic = new Graphic({geometry, symbol}) mapView.graphics.remove(pointG 阅读全文
posted @ 2023-09-19 09:07 ZerlinM 阅读(429) 评论(0) 推荐(0)
摘要:实现代码 使用ArcGIS API for JS4.8绘制点(Point)、线(Polyline)、面(Polygon)、矩形(Rectangle)、圆(Circle),使用Draw绘制,具体代码如下: <!DOCTYPE html> <html> <head> <meta charset="utf 阅读全文
posted @ 2023-09-14 17:53 ZerlinM 阅读(1369) 评论(2) 推荐(0)
摘要:## 问题 点击后弹出气泡的功能,但是只在第一次点击时正常展示气泡,之后点击无反应,代码如下 ``` mapView.on('click', (e: any) => { mapView.hitTest(e).then((e2: any) => { e2.results.forEach((e3: an 阅读全文
posted @ 2023-09-01 14:59 ZerlinM 阅读(176) 评论(0) 推荐(0)
摘要:加载arcgis先查看这个文章 [vue3中使用arcgis](https://www.cnblogs.com/ZerlinM/p/17666502.html) ## 高德 ``` const map = new Map({ basemap: '', // 此处置为空 }) mapView = ne 阅读全文
posted @ 2023-08-30 10:51 ZerlinM 阅读(415) 评论(0) 推荐(0)
摘要:安装 @arcgis/core方式 通过@arcgis/core加载地图资源,默认是半本地化的,因为 assests 资源是通过 https://js.arcgis.com 在线请求的。 npm install @arcgis/core 项目使用 main.ts import "@arcgis/co 阅读全文
posted @ 2023-08-30 09:56 ZerlinM 阅读(1606) 评论(0) 推荐(0)