创建网格
记录创建网格
生成网格
需要用到省界数据,使用QGIS生成网格
效果图
裁剪网格
这样就生成了一个网格的数据
使用shpFile导入
/**
* 添加shp网格
*/
const addTheShpGrid = async () => {
let obj = {
id: 'ShpGrid',
file: `@path:智慧杭州/网格shp/浙江省网格4549.shp`, //shp文件路径
polylineDefaultThickness: 100,
defaultColor: [1, 1, 1, 1], //多边形颜色
offset: [0, 0, 0], //坐标位置偏移量
rotation: [0, 0, 0], //旋转
scale: [1, 1, 1] // 缩放
}
await __g.shapeFile.add(obj)
}