WEB GL JS

웹 개발, 어플리케이션에서 활용될 수 있도록 Javascript로 제공되는 지도 플랫폼 입니다.

로고 위치 변경


routogl 지도에 표시되는 로고의 위치를 변경하는 예제입니다.

변경 가능한 위치 목록은 "top-left", "top-right", "bottom-left" ,"bottom-right" 4가지 입니다.
기본 위치는 "bottom-right" 입니다.

const map = new routogl.Map({
  container: 'map', // container ID
  style: routogl.RoutoStyle.LIGHT,
  center: [127.0586339, 37.507009], // 초기 위치 [lng, lat]
  zoom: 17, // 초기 줌 레벨
});

// 로고 위치 선택 이벤트
const setPosition = document.getElementById('setPosition');
setPosition.addEventListener('change', (e) => {
  const type = e.target.value;
  map.setAttributionControlPosition(type);
});