前三级获取方法
datav.aliyun.com/portal/scho…
map.easyv.cloud/ (这个还可以转换坐标系)
三级以后
上面的方法就不行了
下载软件bigmap
不用授权也行,选择地图那里点添加
添加在线地图源/url就是获取瓦片的接口 header 定义value 填瓦片接口的域名, 点击确定
ps: 测试连接不通过也可以过
然后选择自己要的区域点击下载,下载为kml文件
最后去
把文件依次上传上去,可以组合
点击 save => geojson
echarts map 的json 和这个有些冲突
目前是手动操作的 如果有更好的方法,望能分享 如下操作都是借鉴 datav.aliyun.com/portal/scho… 的结果去总结的,可能不完全
比如
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Polygon",
"coordinates": [
[]
]
},
]
},
"properties": {
"name": "xxx",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
]
}
改成如下
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[]
]
},
"properties": {
"name": "xxx",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
]
}
多个区域,采用MultiPolygon coordinates 就是 多一层[]
Polygon 3层 MultiPolygon 4层
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
xxx
]
],
[
[
xxx
]
]
]
},
"properties": {
"name": "xxx",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
]
}
挖空的就是 3层 Polygon
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
xxx
],
[
xxx 挖空的地方
]
]
},
"properties": {
"name": "xxx",
"fill-opacity": 0,
"stroke-opacity": 1,
"stroke": "#ff0000"
}
},
]
}