功能记录-行政区划(bug【挖洞】:数据结构问题)

老样子,shp点数据转换geojson就不提了,上一篇有(23条消息) 12.3 总结(功能记录:智慧成都地铁网络)_628砍柴人的博客-CSDN博客

挖洞是数据问题,放最后说 

1、画出各个县组成一个面、打上县(区)名marker标签

① :拿到县界数据、使用polygon3d(或polygon)画出每个县的面

注:shp数据是面数据,在三维中需要给z轴设置高度

(1)数据处理:

 getAdministrativeDivisionCounty().then(async ({ data }: any) => {
        data.features.forEach((item: any, index: number) => {
            const placeObj: any = placeNameArr.find((i: any) => i.code == item.properties.code)
            item.geometry.coordinates.forEach((coordinate: any) => {
                coordinate.forEach((c: any) => {
                    c[2] = 350
                })
            })

 (2)拿到各区(县)code:网页 市辖区行政区划代码 - 310100000000是哪里的行政区划代码

每个区数据有个code: 

根据code就可以确定每个区的名字了

提前准备好对应code的区名字以及打marker点的区坐标就可以画面和标上marker标签了:下面是代码:

const addTop = () => {
    const polygon3dArr: any = []
    const markerArr: any = []
    getAdministrativeDivisionCounty().then(async ({ data }: any) => {
        data.features.forEach((item: any, index: number) => {
            const placeObj: any = placeNameArr.find((i: any) => i.code == item.properties.code)
            item.geometry.coordinates.forEach((coordinate: any) => {
                coordinate.forEach((c: any) => {
                    c[2] = 350
                })
            })
            if (placeObj) {
                // 通过每块区域的code值来判断需要对应的颜色
                const top = {
                    id: 'administrative_top_polygon3d_' + index,
                    coordinates: item.geometry.coordinates,
                    color: placeObj.color,
                    height: 50, //3D多边形的高度
                    intensity: 0.2, //亮度
                    style: 1, //3DPolygon的样式 请参照API开发文档选取枚举
                    generateTop: true, //是否生成顶面
                    generateSide: true, //是否生成侧面
                    generateBottom: true //是否生成底面
                }
                _shPolygon3dArr.push('administrative_top_polygon3d_' + index)
                polygon3dArr.push(top)

                // 添加marker
                markerArr.push({
                    id: 'marker-earth-admin-1' + index,
                    coordinate: [placeObj.coordinate[0], placeObj.coordinate[1], placeObj.coordinate[2] + 1000], //坐标位置
                    coordinateType: 0, //默认0是投影坐标系,也可以设置为经纬度空间坐标系值为1
                    anchors: [-25, 50], //锚点,设置Marker的整体偏移,取值规则和imageSize设置的宽高有关,图片的左上角会对准标注点的坐标位置。示例设置规则:x=-imageSize.width/2,y=imageSize.height
                    imagePath: '@path:智慧武汉/map_poi_area_blue.png',
                    imageSize: [100, 80],
                    range: [1, 1000000], //可视范围
                    fixedSize: false, //图片固定尺寸,取值范围:false 自适应,近大远小,true 固定尺寸,默认值:false
                    text: placeObj.name, //显示的文字
                    useTextAnimation: true, //打开文字展开动画效果
                    textRange: [1, 10000000], //文本可视范围[近裁距离, 远裁距离]
                    textOffset: [-85, -22], // 文本偏移
                    textBackgroundColor: [0, 0, 0, 0], //文本背景颜色
                    fontSize: 15, //字体大小
                    fontOutlineSize: 2, //字体轮廓线大小
                    fontColor: Color.Black, //字体颜色
                    fontOutlineColor: Color.White, //字体轮廓线颜色
                    popupSize: [600, 400], //弹窗大小
                    popupOffset: [0, 0], //弹窗偏移
                    showLine: false, //标注点下方是否显示垂直牵引线
                    lineSize: [2, 3], //垂直牵引线宽度和高度[width, height]
                    lineColor: placeObj.color, //垂直牵引线颜色
                    lineOffset: [0, 0], //垂直牵引线偏移

                    autoHidePopupWindow: true, //失去焦点后是否自动关闭弹出窗口
                    autoHeight: false, // 自动判断下方是否有物体
                    displayMode: 2, //显示模式
                    clusterByImage: true, // 聚合时是否根据图片路径分类,即当多个marker的imagePath路径参数相同时按路径对marker分类聚合
                    priority: 0, //避让优先级
                    occlusionCull: false //是否参与遮挡剔除
                })
            }
        })

        //批量添加polygon
        console.log(polygon3dArr, '=============================')

        __g.polygon3d.add(polygon3dArr)
        // __g.marker3d.add(centerArr)
        __g.marker.add(markerArr)
    })
}

②: 边界线(polyline)、底部装饰(polygon+polygon3d)让区划快更有立体感

此处选择的底部装饰没有做太明显的

/**
 * 添加顶部装饰图层
 */
const addTopLayer = () => {
    const polygon3dArr: Array<any> = []
    const polygonArr: Array<any> = []
    const polylineArr: Array<any> = []
    getAdministrativeDivisionCity().then(async ({ data }: any) => {
        data.features.forEach((item: any, index: number) => {
            item.geometry.coordinates.forEach((coors: any, index: number) => {
                const coordinate1 = JSON.parse(JSON.stringify(coors))
                const coordinate3 = JSON.parse(JSON.stringify(coors))
                coordinate3.forEach((item: Array<number>) => {
                    item.forEach((i: any) => {
                        i[2] = 650
                    })
                })
                //底层装饰
                const bottom = {
                    id: 'adminPlanning_bottom_' + coordinate1[0][0][0],
                    coordinates: coordinate3[0],
                    color: '#0e1684',
                    height: 2000, //3D多边形的高度
                    intensity: 5, //亮度
                    style: 3, //3DPolygon的样式 请参照API开发文档选取枚举
                    generateTop: false, //是否生成顶面
                    generateSide: true, //是否生成侧面
                    generateBottom: true //是否生成底面
                }
                polygon3dArr.push(bottom)

                const coordinate4 = JSON.parse(JSON.stringify(coors))
                coordinate4.forEach((item: Array<number>) => {
                    item.forEach((i: any) => {
                        i[2] = 350
                    })
                })
                // 顶层线
                const topLine = {
                    id: 'adminPlanning_line_' + coordinate1[0][0][0], //折线唯一标识id
                    coordinates: coordinate4[0], //构成折线的坐标点数组
                    range: [1, 1000000], //可视范围:[近裁距离, 远裁距离],取值范围: [任意负值, 任意正值]
                    color: '#fff', //折线颜色
                    style: 4, //折线样式 参考样式枚举:PolylineStyle
                    thickness: 400, //折线宽度
                    intensity: 0.2, //亮度
                    flowRate: 0.5, //流速
                    tiling: 0, //材质贴图平铺比例
                    shape: 0, //折线类型 0:直线, 1:曲线
                    depthTest: true //是否做深度检测
                }
                polylineArr.push(topLine)
            })
        })

        //批量添加polygon
        await __g.polygon3d.add(polygon3dArr)

        await __g.polyline.add(polylineArr)

        await __g.polygon.add(polygonArr)
    })
}

③:画上区线,使用 polygon3d让每个区之间的边界流动起来,形成每个区之间的立体感

/**
 * 添加区线
 */
const _shPolygon3dArrZone: any = []
const addingZoneLines = () => {
    const polygon3DArr: any = []
    getAdministrativeDivisionCounty().then(async ({ data }: any) => {
        data.features.forEach((item: any, index: number) => {
            const placeObj: any = placeNameArr.find((i: any) => i.code == item.properties.code)
            if (placeObj) {
                const borderCoord = JSON.parse(JSON.stringify(item.geometry.coordinates))
                borderCoord.forEach((item: any) => {
                    item.forEach((i: any) => {
                        i[2] = 350
                    })
                })
                const border = {
                    id: 'administrative_top_border_' + index, //polygon唯一标识id
                    coordinates: borderCoord[0], //构成polygon的坐标点数组
                    height: 2000, //3D多边形的高度
                    intensity: 1.0, //亮度
                    color: '#000',
                    style: 8, //3DPolygon的样式 请参照API开发文档选取枚举
                    generateTop: false, //是否生成顶面
                    generateSide: true, //是否生成侧面
                    generateBottom: false //是否生成底面
                }
                _shPolygon3dArrZone.push('administrative_top_border_' + index)
                polygon3DArr.push(border)
            }
        })
        //批量添加polygon

        const res = await __g.polygon3d.add(polygon3DArr)
        if (res) {
            await __g.polygon3d.show(_shPolygon3dArrZone)
        }
        // console.log(res, 'dwaaaaaaaaaaa');
    })
}

效果: 

 

bug 数据结构问题造成的挖洞:

可以看到上面的效果图上缺了一块,分析一下原因:

无非两种可能:1、数据缺失   2、在画polygon3d时给的坐标点时三维数组不止一个点数组的二维数组 且其中某个二维数组坐标被另一个二维数组的坐标形成的面包括故造成挖洞(亦或是四维数组中包含的三维数组里不止一个二维数组,且其中某个二维数组坐标被另一个二维数组的坐标形成的面包括)

官方api 坐标点的格式

 

效果图中我们看到,缺洞那一块的行政区划范围面是可以画出来的,所以我们可以确定是第2种可能

 解决方法:我们只需要将打洞的那一块数据给去掉或者是 在给polygon3d赋值坐标时忽略那一块数据

这里有个技巧能精准获取到是那一组数据的结构出了问题(杰哥牛皮)

首先我们先把底部装饰的polygon3d对象给注释掉 让我们鼠标左键点击是能获取到的是构成面的polygon3d 鼠标点击挖洞块的区polygon3d之后,控制台可以打印出来我们创建面polygon3d的对象,根据我们赋值的id可以精准的看到是哪一条数据结构出了问题,这里的数据除了这一个有挖洞的不同之外,其他的三维数组都是只有一项二维数组的点数据,所以,我们在给polygon3d赋值时可以 二维数组提出来再赋值即可

处理前:

coordinates: item.geometry.coordinates, 

处理后:

coordinates: item.geometry.coordinates[0], 

 效果:

最后上全部代码:

import { getAdministrativeDivisionCity, getAdministrativeDivisionCounty } from '@/api/home'
import { useAirCityStore } from '@/stores/aircity'

const airCityStore = useAirCityStore()

// 格子边长 单位米
const cell = 1500
// 格子大小
const cellSize = cell / 1000
// 盒子四个角与中心点的偏移量
const sideLength = cell / 2

/**
 * 颜色转换 从 eg[255,255,255]转为平台颜色[1,1,1]
 * @param colorArr 颜色数组
 * @param opacity 透明度
 */
const getColorConversion = (colorArr: number[], opacity: number) => {
    return [colorArr[0] / 255, colorArr[1] / 255, colorArr[2] / 255, 1]
}

/**
 * 初始化
 */
const initAdministrativeDivision = async () => {
    await __g.camera.stopAnimation()
    await __g.weather.setDarkMode(true)
    // 隐藏成都DX裁核心区
    await __g.tileLayer.hide(airCityStore.layerTreeObject['武汉地形影像4547_1201'])

    // 设置相机视角
    await __g.camera.set(549309.719453, 3323496.992656, 100367.03, -61.709293, -108.284378, 2)

    await __g.polygon3d.delete(_shPolygon3dArrZone)

    await showOrAdd()
}

/**
 * 添加或者显示
 */
const showOrAdd = async () => {
    // 添加顶部
    await addTop()
    await addTopLayer()
    await addingZoneLines()
}
const showPillar = async () => {
    // 添加柱子及marker
    await __g.camera.set(578108.903125, 3350549.919375, 56539.57, -44.668999, -144.609802, 1)
    await __g.marker.clear(null)
    await addPillar()
}
const cleanPillar = async () => {
    // 清除柱子及marker
    await __g.polygon3d.delete(PillarId)
    await __g.customTag.clear(null)
}

/**
 * 还原
 */
const cleanAdministrativePlanning = async () => {
    // __g.weather.setDarkMode(false)
    await __g.polygon.clear(null)
    await __g.polygon3d.clear(null)
    await __g.polyline.clear(null)
    await __g.marker.clear(null)
    await __g.marker3d.clear(null)
    // await __g.tileLayer.hide(airCityStore.layerTreeObject['武汉地形影像4547_1201'])

    await __g.customTag.clear(null)
}

const _shPolygon3dArr: any = []
/**
 * 加顶层面
 */
const addTop = () => {
    const polygon3dArr: any = []
    const markerArr: any = []
    getAdministrativeDivisionCounty().then(async ({ data }: any) => {
        data.features.forEach((item: any, index: number) => {
            const placeObj: any = placeNameArr.find((i: any) => i.code == item.properties.code)
            item.geometry.coordinates.forEach((coordinate: any) => {
                coordinate.forEach((c: any) => {
                    c[2] = 350
                })
            })
            if (placeObj) {
                // 通过每块区域的code值来判断需要对应的颜色
                const top = {
                    id: 'administrative_top_polygon3d_' + index,
                    coordinates: item.geometry.coordinates[0],
                    color: placeObj.color,
                    height: 50, //3D多边形的高度
                    intensity: 0.2, //亮度
                    style: 1, //3DPolygon的样式 请参照API开发文档选取枚举
                    generateTop: true, //是否生成顶面
                    generateSide: true, //是否生成侧面
                    generateBottom: true //是否生成底面
                }
                _shPolygon3dArr.push('administrative_top_polygon3d_' + index)
                polygon3dArr.push(top)

                // 添加marker
                markerArr.push({
                    id: 'marker-earth-admin-1' + index,
                    coordinate: [placeObj.coordinate[0], placeObj.coordinate[1], placeObj.coordinate[2] + 1000], //坐标位置
                    coordinateType: 0, //默认0是投影坐标系,也可以设置为经纬度空间坐标系值为1
                    anchors: [-25, 50], //锚点,设置Marker的整体偏移,取值规则和imageSize设置的宽高有关,图片的左上角会对准标注点的坐标位置。示例设置规则:x=-imageSize.width/2,y=imageSize.height
                    imagePath: '@path:智慧武汉/map_poi_area_blue.png',
                    imageSize: [100, 80],
                    range: [1, 1000000], //可视范围
                    fixedSize: false, //图片固定尺寸,取值范围:false 自适应,近大远小,true 固定尺寸,默认值:false
                    text: placeObj.name, //显示的文字
                    useTextAnimation: true, //打开文字展开动画效果
                    textRange: [1, 10000000], //文本可视范围[近裁距离, 远裁距离]
                    textOffset: [-85, -22], // 文本偏移
                    textBackgroundColor: [0, 0, 0, 0], //文本背景颜色
                    fontSize: 15, //字体大小
                    fontOutlineSize: 2, //字体轮廓线大小
                    fontColor: Color.Black, //字体颜色
                    fontOutlineColor: Color.White, //字体轮廓线颜色
                    popupSize: [600, 400], //弹窗大小
                    popupOffset: [0, 0], //弹窗偏移
                    showLine: false, //标注点下方是否显示垂直牵引线
                    lineSize: [2, 3], //垂直牵引线宽度和高度[width, height]
                    lineColor: placeObj.color, //垂直牵引线颜色
                    lineOffset: [0, 0], //垂直牵引线偏移

                    autoHidePopupWindow: true, //失去焦点后是否自动关闭弹出窗口
                    autoHeight: false, // 自动判断下方是否有物体
                    displayMode: 2, //显示模式
                    clusterByImage: true, // 聚合时是否根据图片路径分类,即当多个marker的imagePath路径参数相同时按路径对marker分类聚合
                    priority: 0, //避让优先级
                    occlusionCull: false //是否参与遮挡剔除
                })
            }
        })

        //批量添加polygon
        console.log(polygon3dArr, '=============================')

        __g.polygon3d.add(polygon3dArr)
        // __g.marker3d.add(centerArr)
        __g.marker.add(markerArr)
    })
}

//添加柱子(polygon3d)
const PillarId: any = []
const addPillar = () => {
    const polygon3dArr: any = []
    const customTag: any = []
    getAdministrativeDivisionCounty().then(async ({ data }: any) => {
        data.features.forEach((item: any, index: number) => {
            const placeObj: any = placeNameArr.find((i: any) => i.code == item.properties.code)
            item.geometry.coordinates.forEach((coordinate: any) => {
                coordinate.forEach((c: any) => {
                    c[2] = 350
                })
            })
            if (placeObj) {
                let x = placeObj.coordinate[0] + 3 * cell
                const y = placeObj.coordinate[1]
                const z = placeObj.coordinate[2]
                const topLeft = [x - sideLength, y + sideLength, z]
                const topRight = [x - sideLength, y - sideLength, z]
                const bottomLeft = [x + sideLength, y - sideLength, z]
                const bottomRight = [x + sideLength, y + sideLength, z]
                //面积
                let pillarArea = {
                    id: 'pillarArea_top_polygon3d_' + index,
                    coordinates: [topLeft, topRight, bottomLeft, bottomRight],
                    color: '#529b2e', //颜色值
                    height: placeObj.value.pillarArea * 4, //3D多边形的高度
                    intensity: 1.0, //亮度
                    style: 10, //3DPolygon的样式 请参照API开发文档选取枚举
                    generateTop: true, //是否生成顶面
                    generateSide: true, //是否生成侧面
                    generateBottom: true //是否生成底面
                }

                x = placeObj.coordinate[0] + cell
                let topLeft2 = [x - sideLength, y + sideLength, z]
                let topRight2 = [x - sideLength, y - sideLength, z]
                let bottomLeft2 = [x + sideLength, y - sideLength, z]
                let bottomRight2 = [x + sideLength, y + sideLength, z]
                //经济
                let pillarEconomics = {
                    id: 'pillarEconomics_top_polygon3d_' + index,
                    coordinates: [topLeft2, topRight2, bottomLeft2, bottomRight2],
                    color: [0, 0, 1, 1], //颜色值
                    height: placeObj.value.pillarEconomics * 4.99, //3D多边形的高度
                    intensity: 1.0, //亮度
                    style: 10, //3DPolygon的样式 请参照API开发文档选取枚举
                    generateTop: true, //是否生成顶面
                    generateSide: true, //是否生成侧面
                    generateBottom: true //是否生成底面
                }

                x = placeObj.coordinate[0] + 2 * cell
                let topLeft3 = [x - sideLength, y + sideLength, z]
                let topRight3 = [x - sideLength, y - sideLength, z]
                let bottomLeft3 = [x + sideLength, y - sideLength, z]
                let bottomRight3 = [x + sideLength, y + sideLength, z]
                //人口
                let pillarPopulation = {
                    id: 'pillarPopulation_top_polygon3d_' + index,
                    coordinates: [topLeft3, topRight3, bottomLeft3, bottomRight3],
                    color: [1, 0, 0, 1], //颜色值
                    height: placeObj.value.pillarPopulation * 57.8, //3D多边形的高度
                    intensity: 1.0, //亮度
                    style: 10, //3DPolygon的样式 请参照API开发文档选取枚举
                    generateTop: true, //是否生成顶面
                    generateSide: true, //是否生成侧面
                    generateBottom: true //是否生成底面
                }

                customTag.push({
                    id: 'customTag-' + index,
                    coordinate: [placeObj.coordinate[0] + 2 * cell, placeObj.coordinate[1], placeObj.coordinate[2] + 11000],
                    contentURL: '@path:智慧武汉/customTag/administrativeDivisionImg.html', // 网页URL
                    contentSize: [80, 80], //网页窗口宽高 [width, height]
                    pivot: [0.5, 0.4], // 中心点
                    range: [0, 1000000], //显示范围:[min, max]
                    popupURL: `@path:智慧武汉/customTag/administrativeDivisionTag.html?index=${placeObj.name}-${placeObj.value.pillarArea}-${placeObj.value.pillarEconomics}-${placeObj.value.pillarPopulation}`, //弹窗地址url
                    popupSize: [250, 370], //弹窗尺寸
                    popupPos: [-35, -18], //弹窗位置: [x, y]
                    autoHidePopupWindow: true //失去焦点后是否自动关闭弹出窗口
                })

                polygon3dArr.push(pillarArea)
                polygon3dArr.push(pillarEconomics)
                polygon3dArr.push(pillarPopulation)
                PillarId.push('pillarArea_top_polygon3d_' + index)

                PillarId.push('pillarEconomics_top_polygon3d_' + index)
                PillarId.push('pillarPopulation_top_polygon3d_' + index)
            }
        })
        //批量添加polygon
        await __g.polygon3d.add(polygon3dArr)
        // await __g.marker.add(markerArr)
        await __g.customTag.add(customTag)
    })
}
/**
 * 添加顶部装饰图层
 */
const addTopLayer = () => {
    const polygon3dArr: Array<any> = []
    const polygonArr: Array<any> = []
    const polylineArr: Array<any> = []
    getAdministrativeDivisionCity().then(async ({ data }: any) => {
        data.features.forEach((item: any, index: number) => {
            item.geometry.coordinates.forEach((coors: any, index: number) => {
                const coordinate1 = JSON.parse(JSON.stringify(coors))
                const coordinate3 = JSON.parse(JSON.stringify(coors))
                coordinate3.forEach((item: Array<number>) => {
                    item.forEach((i: any) => {
                        i[2] = 650
                    })
                })
                //底层装饰
                const bottom = {
                    id: 'adminPlanning_bottom_' + coordinate1[0][0][0],
                    coordinates: coordinate3[0],
                    color: '#0e1684',
                    height: 2000, //3D多边形的高度
                    intensity: 5, //亮度
                    style: 3, //3DPolygon的样式 请参照API开发文档选取枚举
                    generateTop: false, //是否生成顶面
                    generateSide: true, //是否生成侧面
                    generateBottom: true //是否生成底面
                }
                polygon3dArr.push(bottom)

                const coordinate4 = JSON.parse(JSON.stringify(coors))
                coordinate4.forEach((item: Array<number>) => {
                    item.forEach((i: any) => {
                        i[2] = 350
                    })
                })
                // 顶层线
                const topLine = {
                    id: 'adminPlanning_line_' + coordinate1[0][0][0], //折线唯一标识id
                    coordinates: coordinate4[0], //构成折线的坐标点数组
                    range: [1, 1000000], //可视范围:[近裁距离, 远裁距离],取值范围: [任意负值, 任意正值]
                    color: '#fff', //折线颜色
                    style: 4, //折线样式 参考样式枚举:PolylineStyle
                    thickness: 400, //折线宽度
                    intensity: 0.2, //亮度
                    flowRate: 0.5, //流速
                    tiling: 0, //材质贴图平铺比例
                    shape: 0, //折线类型 0:直线, 1:曲线
                    depthTest: true //是否做深度检测
                }
                polylineArr.push(topLine)
            })
        })

        //批量添加polygon
        await __g.polygon3d.add(polygon3dArr)

        await __g.polyline.add(polylineArr)

        await __g.polygon.add(polygonArr)
    })
}

/**
 * 添加区线
 */
const _shPolygon3dArrZone: any = []
const addingZoneLines = () => {
    const polygon3DArr: any = []
    getAdministrativeDivisionCounty().then(async ({ data }: any) => {
        data.features.forEach((item: any, index: number) => {
            const placeObj: any = placeNameArr.find((i: any) => i.code == item.properties.code)
            if (placeObj) {
                const borderCoord = JSON.parse(JSON.stringify(item.geometry.coordinates))
                borderCoord.forEach((item: any) => {
                    item.forEach((i: any) => {
                        i[2] = 350
                    })
                })
                const border = {
                    id: 'administrative_top_border_' + index, //polygon唯一标识id
                    coordinates: borderCoord[0], //构成polygon的坐标点数组
                    height: 2000, //3D多边形的高度
                    intensity: 1.0, //亮度
                    color: '#000',
                    style: 8, //3DPolygon的样式 请参照API开发文档选取枚举
                    generateTop: false, //是否生成顶面
                    generateSide: true, //是否生成侧面
                    generateBottom: false //是否生成底面
                }
                _shPolygon3dArrZone.push('administrative_top_border_' + index)
                polygon3DArr.push(border)
            }
        })
        //批量添加polygon

        const res = await __g.polygon3d.add(polygon3DArr)
        if (res) {
            await __g.polygon3d.show(_shPolygon3dArrZone)
        }
    })
}

const placeNameArr: any = [
    {
        name: '江岸区',
        color: getColorConversion([199, 129, 0], 1),
        coordinate: [526303.625, 3391442, 350.99749755859375],
        code: '420102000000',
        value: {
            pillarArea: 70.2,
            pillarEconomics: 1247.04,
            pillarPopulation: 96.53
        }
    },
    {
        name: '江汉区',
        color: getColorConversion([68, 255, 0], 1),
        coordinate: [522634.78125, 3386256.75, 350],
        code: '420103000000',
        value: {
            pillarArea: 27.2,
            pillarEconomics: 1319.06,
            pillarPopulation: 64.79
        }
    },
    {
        name: '硚口区',
        color: getColorConversion([255, 123, 0], 1),
        coordinate: [517492.46875, 3387962.5, 350],
        code: '420104000000',
        value: {
            pillarArea: 36.7,
            pillarEconomics: 801.16,
            pillarPopulation: 66.67
        }
    },
    {
        name: '汉阳区',
        color: getColorConversion([47, 203, 255], 1),
        coordinate: [518931.5625, 3377453, 350.00250244140625],
        code: '420105000000',
        value: {
            pillarArea: 111.543,
            pillarEconomics: 699.01,
            pillarPopulation: 83.73
        }
    },
    {
        name: '武昌区',
        color: getColorConversion([255, 114, 243], 1),
        coordinate: [530936.25, 3382207, 350.02001953125],
        code: '420106000000',
        value: {
            pillarArea: 107.76,
            pillarEconomics: 1492.93,
            pillarPopulation: 109.28
        }
    },
    {
        name: '青山区',
        color: getColorConversion([0, 255, 234], 1),
        coordinate: [542623.1875, 3387964.5, 350.99874877929688],
        code: '420107000000',
        value: {
            pillarArea: 66.09,
            pillarEconomics: 761.47,
            pillarPopulation: 46.33
        }
    },
    {
        name: '洪山区',
        color: getColorConversion([255, 255, 0], 1),
        coordinate: [522634.78125, 3386256.75, 350],
        code: '420111000000',
        value: {
            pillarArea: 220.5,
            pillarEconomics: 1036.16,
            pillarPopulation: 172.8
        }
    },
    {
        name: '东西湖区',
        color: getColorConversion([134, 134, 255], 1),
        coordinate: [505176.25, 3397951.25, 350.989990234375],
        code: '420112000000',
        value: {
            pillarArea: 495,
            pillarEconomics: 1370.17,
            pillarPopulation: 84.58
        }
    },
    {
        name: '汉南区',
        color: getColorConversion([251, 0, 255], 1),
        coordinate: [500627.125, 3354134.75, 350.010009765625],
        code: '420113000000',
        value: {
            pillarArea: 287,
            pillarEconomics: 1650.31,
            pillarPopulation: 48.13
        }
    },
    {
        name: '蔡甸区',
        color: getColorConversion([204, 205, 51], 1),
        coordinate: [497882.875, 3372406.5, 350.0048828125],
        code: '420114000000',
        value: {
            pillarArea: 1093.57,
            pillarEconomics: 371.34,
            pillarPopulation: 55.44
        }
    },
    {
        name: '江夏区',
        color: getColorConversion([0, 132, 255], 1),
        coordinate: [521575.125, 3347752.75, 350.010009765625],
        code: '420115000000',
        value: {
            pillarArea: 2018.3,
            pillarEconomics: 842.04,
            pillarPopulation: 97.47
        }
    },
    {
        name: '黄陂区',
        color: getColorConversion([230, 255, 129], 1),
        coordinate: [533852.8125, 3408715.5, 350.010009765625],
        code: '420116000000',
        value: {
            pillarArea: 2261,
            pillarEconomics: 1013.28,
            pillarPopulation: 115.16
        }
    },
    {
        name: '新洲区',
        color: getColorConversion([255, 191, 0], 1),
        coordinate: [564884.8125, 3402051, 350.010009765625],
        code: '420117000000',
        value: {
            pillarArea: 1463.43,
            pillarEconomics: 888.57,
            pillarPopulation: 86.04
        }
    }
]

export { initAdministrativeDivision, cleanAdministrativePlanning, showPillar, cleanPillar }

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值