【发布时间】:2021-03-30 07:37:47
【问题描述】:
我的服务器上有这样的 JSON:
{
"coordinates": [
[
[
-122.41251225499991,
37.78047851100007
],
[
-122.42194124699989,
37.77303605000009
],
...trimmed...
[
-122.41251225499991,
37.78047851100007
]
]
],
"crs": {
"properties": {
"name": "EPSG:4326"
},
"type": "name"
},
"type": "Polygon"
}
我想在我的服务器上解析这个,但我不知道该怎么做。我找到了两个与 GeoJSON 一起使用的 Dart 库:
geojson https://pub.dev/packages/geojson geojson_vi https://pub.dev/packages/geojson_vi
这两个都只能从字符串函数中解析,但我有一张地图。在 Dart/Flutter 中解析此类内容的最佳方法是什么?
【问题讨论】: