这是我试图用django-leaflet和django-geojson在Django上渲染的geojson对象。
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"model": "rent_app.apartment"
},
"id": "APT",
"geometry": {
"type": "Point",
"coordinates": [
38.771353,
8.984487
]
}
},
{
"type": "Feature",
"properties": {
"model": "rent_app.apartment"
},
"id": "APT2",
"geometry": {
"type": "Point",
"coordinates": [
38.773155,
8.98525
]
}
}
],
"crs": {
"type": "link",
"properties": {
"href": "http://spatialreference.org/ref/epsg/4326/",
"type": "proj4"
}
}
}我在尝试渲染geojson时得到了Invalid GeoJSON object。有什么解决方案吗?
发布于 2020-05-28 04:14:20
事实证明,GeoJSON有一个额外的花括号,这打破了geojson格式,或者crs不再被接受。
https://stackoverflow.com/questions/61744377
复制相似问题