본문 바로가기

javascript/OpenLayers

(3)
OpenLayers 오픈레이어스에서 선 여러개 긋기 OpenLayers 오픈레이어스에서 지도위에 선 여러개 긋기. 아래 코드는 제가 작업한 전체코드의 일부이기 때문에 복붙 그대로 하시면 아마 안될것입니다. 참고만 하세요~ 그리고 미래의 나를 위해.. 오늘도 일단 테스트 코드를 블로그에 열심히 복붙... 제발 까먹지 말기... 1번 : 처음에는 한개만 그어놨었는데... 여러개가 필요하다면 어떻게 해야될지 고민했다. 이런식이라면 객체를 계속 생성해야 되기 때문에 선 1개 그을때는 모르겠지만 여러개를 긋는다면 보완이 필요함. drawLineTEST: function () { // 지도 생성 let map = new ol.Map({ target: 'odAnlsTEST', layers: [ new ol.layer.Tile({ source: new ol.source..
openlayers 참고 https://openlayers.org/doc/tutorials/concepts.html OpenLayers - Basic Concepts Basic Concepts Map The core component of OpenLayers is the map (from the ol/Map module). It is rendered to a target container (e.g. a div element on the web page that contains the map). All map properties can either be configured at construction time, or b openlayers.org https://wldnjd2.tistory.com/23 OpenLayers Map 띄..
오픈레이어스 선 긋기 OpenLayers LineString OpenLayers 버전 v7.4.0 오픈레이어스 선 긋기 예제.. 이거 하나 하느라 몇시간을 불태웠는지.. 후.. 역시 알고나면 아무것도 아닌데, 알기전에는 너무 스트레스다. html : js : // OpenLayers에서 맵을 생성합니다. var map = new ol.Map({ target: 'map', // 맵이 표시될 영역의 ID를 지정합니다. layers: [ // 기본적으로 사용할 레이어를 추가합니다. 여기서는 OSM (OpenStreetMap)을 사용합니다. new ol.layer.Tile({ source: new ol.source.OSM() }) ], view: new ol.View({ center: ol.proj.fromLonLat([127.0287172, 37.2635620]), /..