0
有沒有辦法在openlayers中讀取geojson並轉換爲WKT格式,我的問題是,當我添加多個geojson作爲矢量圖層時,它們不會顯示爲一個圖層, kindly tell我怎麼顯示多個以GeoJSON作爲一個載體層的一部分,我的代碼是openlayers geojson讀爲wkt
for (var i = 0; i < content.GeoJsonFiles.length; i++) {
//color = content.Settings.BreakStyles[totalcolor].Color;
//totalcolor++;
var id = content.GeoJsonFiles[i];
// alert(content.GeoJsonFiles[i]);
var geojson_layer = new OpenLayers.Layer.Vector("GeoJSON", {
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url:'i.geojson' ,
format: new OpenLayers.Format.GeoJSON({})
}), renderers: ["Canvas", "SVG", "VML"]
});
map.addLayer(geojson_layer);
}