NaverStaticImageryProvider

네이버 지도 이미지 제공 클래스.
Provides naver static imagery by requesting tiles.
Name Type Description
options object 다음과 같은 속성을 가진 객체.
Object with the following properties:
Name Type Description
clientId string 네이버에서 발급한 클라이언트 ID.
(API 키 발급처: https://www.ncloud.com/product/applicationService/maps)
The clientId issued by Naver.
clientSecret string 네이버에서 발급한 클라이언트 secret key.
(API 키 발급처: https://www.ncloud.com/product/applicationService/maps)
The clientSecret issued by Naver.
mapType string 네이버 지도 유형.
   1. "basic"- 일반지도
   2. "traffic"- 교통지도
   3. "satellite"-위성지도
   4. "satellite_base"- 위성 배경지도
   5. "terrain"- 지형도
The type of Naver map. (ex: "basic", "traffic", "satellite", "satellite_base", "terrain")
proxy string 프록시 요청 주소. 지정되지 않은 경우(기본값:"/proxy/")
The proxy request address is required. otherwise, Naver map will not be requested (default value: "/proxy/")
Example:
// DitapViewer 생성
const viewer = new Ditap.DitapViewer("ditapContainer", {
  baseLayerPicker: true,
});

// DitapBaseLayerPicker 인스턴스 생성
const ditapBaseLayerPicker = viewer.ditapBaseLayerPicker;

const naverImageryProvider = new Ditap.ProviderViewModel({
  name: "Naver Map",
  iconUrl: getUrlFromBase64(Ditap.ConstantUrl.NAVER_MAP_IMG_URL),
  tooltip: "Naver Map",
  category: "Other",
  creationFunction: function () {
    return new Ditap.NaverStaticImageryProvider({
      // 발급 받은 clientId 추가 (필수)
      clientId: clientId,

      // 발급 받은 clientSecret 추가 (필수)
      clientSecret: clientSecret,

      // 맵 추가 (필수)
      mapType: "basic",

      // 프록시 요청 주소 추가 (필수)
      proxy: "/proxy/",
    });
  },
});

ditapBaseLayerPicker.viewModel.selectedImagery = naverImageryProvider;