基于高德地图实现可编辑的电子围栏功能【多边形围栏】 您所在的位置:网站首页 电子围栏放牧 基于高德地图实现可编辑的电子围栏功能【多边形围栏】

基于高德地图实现可编辑的电子围栏功能【多边形围栏】

2023-09-18 19:39| 来源: 网络整理| 查看: 265

上次基于高德地图实现了圆形围栏功能,但限于实地使用场景,故近期重新升级到多边形电子围栏,经过反复测验及优化,目前可正常使用。

1、主要功能: 多边形围栏的CURD;自定义变数,形状;自动计算变数及面积。 2、效果图:

3、核心代码: //Update by liangxin at 2020-09-03 map.setFitView([ polygon ]); polyEditor.on('addnode', function(event) { polyEditorEvent(event.target.getPath()); }) polyEditor.on('adjust', function(event) { polyEditorEvent(event.target.getPath()); }) polyEditor.on('removenode', function(event) { polyEditorEvent(event.target.getPath()); }) polyEditor.on('end', function(event) { polyEditorEvent(event.target.getPath()); }) polyEditor.open();polyEditor.close();//初始加载时,主动触发地图事件计算面积

 



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有