[ Openlayers ] ์คํ๋ ์ด์ด์ค์์ ์ขํ๊ณ ๋ณํ์ด ์๋๋ ๊ฒฝ์ฐ( ol6 ๊ธฐ์ค )
๋ค์์ ๊ฒฝ์ฐ๋ 5179์ขํ๊ณ๋ฅผ ์ฌ์ฉํ๋ geojson์ ์ฝ์ด๋ค์ฌ ์ขํ๊ณ ๋ณํ์ ํ๋ ๊ฒฝ์ฐ์ด๋ค. var vectorSource = new ol.source.Vector({ format: new ol.format.GeoJSON(), loader: function (extent) { const url = "./geojson/seoulHD.geojson";//5179 fetch(url) .then((response) => response.json()) .then((data) => { const features = vectorSource.getFormat().readFeatures(data); console.log("๋ณํ์ - ",features[0].getGeometry().getCoordinates()[0][..
โ Programming/โ GIS
2023. 3. 21. 11:19
๋ฐ์ํ