我正在使用GeoJson格式为国家/地区创建地图,但我想知道在哪里放置额外的国家/地区信息,例如Name
,Country Code
和一些有用的信息。
我知道我们可以轻松地为功能(在我的情况下是区域数据)执行此操作,但在哪里可以放置国家/地区属性?
us.json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"REGION_ID": 1,
"REGION_NAME": "My First Region",
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[1.83, 15.93]
],
...
]
}
}
...
]
}
答案 0 :(得分:0)
如果我将其插入Mapbox geojsonhint,则表示没有错误:
{
"type": "FeatureCollection",
"properties": {
"name": "United states of America"
},
"features": [
{
"type": "Feature",
"properties": {
"REGION_ID": 1,
"REGION_NAME": "My First Region"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[1.83, 15.93], [1.83, 15.93], [1.83, 15.93], [1.83, 15.93]
]
]
}
}
]
}