超图 openlayers 根据多边形数据展示图层(根据coordinates限制图层范围=》裁剪)

图层的feature 

var geometry = feature.getGeometry();

  // 具体的坐标点列表(数组形式)

let coordinates = geometry.getCoordinates();

// 转换坐标数组为ol.geom.Polygon  

let geometry = new geom.MultiPolygon([data.coordinates]);

  let zslayer = new TileLayer({

                source: new TileSuperMapRest({

                    url: this.mapBaseUrl + data.path,

                    clipRegionEnabled: true,//开启图层裁剪

                    clipRegion: geometry,

                }),

                params: data,

                projection: 'EPSG:4326',

                visible: true

            })

            this.mapObject.addLayer(zslayer)

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-28 23:56:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-28 23:56:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-28 23:56:02       87 阅读
  4. Python语言-面向对象

    2024-04-28 23:56:02       96 阅读

热门阅读

  1. C语言基础—多线程基础

    2024-04-28 23:56:02       34 阅读
  2. YOLOV5 TensorRT部署 BatchedNMS(转换engine模型)(上)

    2024-04-28 23:56:02       36 阅读
  3. 在Docker中为Nginx容器添加多端口映射的详细指南

    2024-04-28 23:56:02       30 阅读
  4. 描述一下PHP中的MVC设计模式

    2024-04-28 23:56:02       29 阅读
  5. Linux系统使用命令来查看本地端口的使用情况

    2024-04-28 23:56:02       32 阅读
  6. Linux Makefile编写之可执行程序

    2024-04-28 23:56:02       124 阅读
  7. 先出发再思考怎么解决问题

    2024-04-28 23:56:02       155 阅读
  8. IDEA那些牛X的插件

    2024-04-28 23:56:02       36 阅读
  9. 安全运营之通行字管理

    2024-04-28 23:56:02       119 阅读