【发布时间】:2015-09-03 13:40:17
【问题描述】:
我想在地图上显示传单 MarkerCluster,问题在于从 GeoJSON 检索数据:
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"id": "sto",
"properties": {
"name": "Stoke"
},
"geometry": {
"type": "Point",
"coordinates": [
-0.0731,
51.5615
]
}
},
{
"type": "Feature",
"id": "dal",
"properties": {
"name": "Dalston"
},
"geometry": {
"type": "Point",
"coordinates": [
-0.070,
51.545
]
}
},
{
"type": "Feature",
"id": "wan",
"properties": {
"name": "Wandsworth"
},
"geometry": {
"type": "Point",
"coordinates": [
-0.1924,
51.4644
]
}
},
{
"type": "Feature",
"id": "batt",
"properties": {
"name": "Battersea"
},
"geometry": {
"type": "Point",
"coordinates": [
-0.1677,
51.4638
]
}
}
]
}
我试图在两个示例中重现相同的情况:
有人知道为什么第二个示例中的 MarkerCluster 没有显示吗? 我错过了 geojson 中的某些属性吗?
【问题讨论】:
-
他们都在我这边展示了同样的东西..
-
但不幸的是一开始并非如此Example with geojsonExample without geojson
标签: angularjs geojson markerclusterer angular-leaflet-directive