我從 overpass -turbo將這些多邊形匯出為 geojson 格式。我可以通過從本地源傳遞 geojson 來使用d3js顯示這些資料。
我想知道如何在 kendo-ui 中設定此地圖?例如,我的 geojson 物件存盤在變數map中,然后分配map給屬性dataSource不起作用。有關作業示例,請參閱 jsfiddle 的鏈接。加載內容需要一些時間。
$("#svganchor").kendoMap({
center: [13.53, 52.41],
zoom: 5,
layers: [{
type: "shape",
dataSource: map,
style: {
fill: {
color: "blue",
opacity: 0.7
}
}
}]
});
uj5u.com熱心網友回復:
如果要從本地加載資料,則必須模擬傳輸功能。
dataSource: {
type: "geojson",
transport: {
read: function(e) {
e.success(map);
}
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/418699.html
標籤:
