반응형

저번 포스팅에서 Proj4js를 활용해서 좌표계를 변경한 적이 있다.

 

이번에는 openlayers을 활용해서 좌표계를 변경해보도록 하겠다.

 

openlayers 설치에 관련해서는 아래 링크를 참조하고 넘어가겠다.

openlayers.org/en/latest/doc/quickstart.html

 

OpenLayers - Quick Start

Quick Start This primer shows you how to put a simple map on a web page. For production, we strongly recommend bundling the application together with its dependencies, as explained in the Building an OpenLayers Application tutorial. Put a map on a page Bel

openlayers.org

오픈레이어스는 구글좌표계 EPSG:3857를 기본 좌표계로 사용한다.

 

EPSG:3857을 경위도 EPSG:4326으로 바꿔보도록하겠다.

var x=00000	//3857좌표계 x
var y=00000 //3857좌표계 y

var transformPos = new ol.proj.fromLonLat([x,y]);

console.log(transformPos);

 

다음 포스팅에서는 Proj4js와 함께 한국 좌표계를 가지고 변환하는 걸 해볼 것이다.

 

반응형

+ Recent posts