Type alias MapOptions

MapOptions: {
    ktLogo?: boolean;
    logoPosition?: ControlPosition;
    navigationControl?: boolean;
    navigationOptions?: NavigationOptions;
    minimapControl?: boolean;
    minimapOptions?: MinimapOptions;
    drawControl?: boolean;
    drawOptions?: DrawOptions;
    scaleControl?: boolean;
    scaleOptions?: ScaleOptions;
    geolocateControl?: boolean;
    geolocateOptions?: GeolocateOptions;
    antialias?: boolean;
    container: HTMLElement | string;
    minZoom?: number;
    maxZoom?: number;
    minPitch?: number;
    maxPitch?: number | null;
    style: StyleSpecification | string;
    hash?: boolean | string;
    interactive?: boolean;
    bearingSnap?: number;
    pitchWithRotate?: boolean;
    clickTolerance?: number;
    attributionControl?: false | AttributionControlOptions;
    attributionOptions?: AttributionOptions;
    failIfMajorPerformanceCaveat?: boolean;
    preserveDrawingBuffer?: boolean;
    refreshExpiredTiles?: boolean;
    maxBounds?: LngLatBoundsLike;
    scrollZoom?: boolean;
    boxZoom?: boolean;
    dragRotate?: boolean;
    dragPan?: DragPanOptions | boolean;
    keyboard?: boolean;
    doubleClickZoom?: boolean;
    touchZoomRotate?: boolean;
    touchPitch?: boolean;
    cooperativeGestures?: boolean | GestureOptions;
    trackResize?: boolean;
    center?: LngLatLike;
    zoom?: number;
    bearing?: number;
    pitch?: number;
    maxTileCacheSize?: number;
    maxTileCacheZoomLevels?: number;
    transformRequest?: RequestTransformFunction;
    transformCameraUpdate?: CameraUpdateTransformFunction;
    fadeDuration?: number;
    crossSourceCollisions?: boolean;
    collectResourceTiming?: boolean;
    bounds?: LngLatBoundsLike;
    fitBoundsOptions?: Object;
    localIdeographFontFamily?: string;
    pixelRatio?: number;
    validateStyle?: boolean;
}

기본 Map 생성할 때 파라미터로 들어가는 MapOptions입니다. Map 생성은 Map을 참고해주세요

Type declaration

  • Optional ktLogo?: boolean

    ktLogo 표시 여부입니다. true이면 KT 로고가 표시됩니다. 로고 컨트롤 생성을 원하면 LogoControl을 확인해주세요.

    Default

    true
    
  • Optional logoPosition?: ControlPosition

    ktLogo 위치입니다. 지도에서 KT로고의 위치를 ​​나타내는 문자열입니다. 유효한 옵션은 top-left , top-right , bottom-left , bottom-right 입니다.

    Default

    'bottom-left'
    
  • Optional navigationControl?: boolean

    navigation control 표시 여부입니다. true이면 내비게이션 컨트롤이 맵에 표시됩니다. NavigationControl 객체 생성으로도 표시할 수 있습니다.

  • Optional navigationOptions?: NavigationOptions

    navigationControl 생성 옵션입니다. 옵션을 명시해도 navigationControl이 false라면 내비게이션이 생성되지 않습니다.

  • Optional minimapControl?: boolean

    minimap control 표시 여부입니다. true인 경우 미니맵 컨트롤이 맵에 표시됩니다. MinimapControl 객체 생성으로도 표시할 수 있습니다.

    Default

    false
    
  • Optional minimapOptions?: MinimapOptions

    minimapControl 생성 옵션입니다. 옵션을 명시해도 minimapControl이 false라면 미니맵이 생성되지 않습니다.

  • Optional drawControl?: boolean

    draw control 표시 여부입니다. true인 경우 드로우 컨트롤이 맵에 표시됩니다. DrawControl 객체 생성으로도 표시할 수 있습니다.

    Default

    false
    
  • Optional drawOptions?: DrawOptions

    drawControl 생성 옵션입니다. 옵션을 명시해도 drawControl이 false라면 드로우 컨트롤이 생성되지 않습니다.

  • Optional scaleControl?: boolean

    scale control 표시 여부입니다. true인 경우 scale 컨트롤이 맵에 표시됩니다. ScaleControl 객체 생성으로도 표시할 수 있습니다.

    Default

    false
    
  • Optional scaleOptions?: ScaleOptions

    scaleControl 생성 옵션입니다. 옵션을 명시해도 scaleControl이 false라면 scale 컨트롤이 생성되지 않습니다.

  • Optional geolocateControl?: boolean

    geolocate control 표시 여부입니다. true인 경우 위치 컨트롤이 맵에 표시됩니다. GeolocateControl 객체 생성으로도 표시할 수 있습니다.

    Default

    false
    
  • Optional geolocateOptions?: GeolocateOptions

    geolocateControl 생성 옵션입니다. 옵션을 명시해도 geolocateControl false라면 위치 컨트롤이 생성되지 않습니다.

  • Optional antialias?: boolean

    true인 경우 gl 컨텍스트는 MSAA 안티앨리어싱으로 생성되며, 이는 커스텀 레이어 안티앨리어싱에 유용할 수 있습니다.

    false가 기본적으로 성능 최적화입니다.

  • container: HTMLElement | string

    지도를 렌더링할 HTML 요소 또는 요소의 문자열 id입니다. 지정된 요소에는 자식이 없어야 합니다.

  • Optional minZoom?: number

    지도의 최소 확대/축소 수준입니다. 6에서 22까지 가능하며, 기본값은 6입니다.

    Default

    6
    
  • Optional maxZoom?: number

    지도의 최대 확대/축소 수준입니다. 6에서 22까지 가능하며, 기본값은 22입니다.

    Default

    22
    
  • Optional minPitch?: number

    맵의 최소 피치입니다. 0에서 60까지 가능하며, 기본값은 0입니다.

    Default

    0
    
  • Optional maxPitch?: number | null

    맵의 최대 피치입니다. 0에서 60까지 가능하며, 기본값은 60입니다. 60도보다 큰 값은 실험적이며 렌더링 문제가 발생할 수 있습니다.

    Default

    60
    
  • style: StyleSpecification | string

    지도의 스타일입니다. basic 또는 satellite로 지도 스타일을 설정할 수 있습니다.

    • basic : 일반 지도
    • satellite : 항공지도
  • Optional hash?: boolean | string

    지도를 페이지 url로 조작할 수 있는지에 대한 여부입니다. true인 경우, map의 위치를 #zoom(확대/축소) / center latitude(중심 위도) / center longitude(중심 경도) / bearing(방위) / pitch(피치)를 페이지 URL에 추가하여 조작할 수 있습니다.

    Example

    'http://mapurl#16/37.49144/127.017422/130/15'
    

    Default

    false
    
  • Optional interactive?: boolean

    사용자 이벤트(마우스, 터치, 키보드) 발생 시 맵에 연결시킬지에 대한 여부입니다. false이면 사용자 이벤트에 응답하지 않습니다.

    Default

    true
    
  • Optional bearingSnap?: number

    지도의 방위가 북쪽으로 스냅되는 시기를 결정하는 각도입니다. 예를 들어, bearingSnap:7인 경우, 사용자가 북쪽 기준 7도 이내로 지도를 회전하면 지도가 자동으로 정북에 맞춰집니다

    Default

    7
    
  • Optional pitchWithRotate?: boolean

    드래그 이벤트로 맵의 피치(pitch)를 조정할지에 대한 여부입니다. false이면 드래그로 맵의 피치를 조정할 수 없습니다

    Default

    true
    
  • Optional clickTolerance?: number

    사용자가 클릭하는 동안 유효한 클릭으로 간주하기 위해 마우스 포인터를 이동할 수 있는 최대 픽셀수입니다. 마우스 드래그와 반대입니다.

    Default

    3
    
  • Optional attributionControl?: false | AttributionControlOptions

    attribution 컨트롤 표시 유무입니다. true인 경우 AttributionControl이 맵에 추가됩니다.

    Default

    false
    
  • Optional attributionOptions?: AttributionOptions

    속성 컨트롤(AttributionControl) 생성할 때 파라미터로 들어가는 AttributionOptions 입니다. 속성 컨트롤 생성은 AttributionControl을 참고해주세요.

  • Optional failIfMajorPerformanceCaveat?: boolean

    true일 시, Map Engine의 성능이 나빠지면 맵 생성에 실패합니다.

    Default

    false
    
  • Optional preserveDrawingBuffer?: boolean

    true일 시, map.getCanvas().toDataURL()코드로 지도의 canvas를 사용하여 PNG로 내보낼 수 있습니다. 성능 최적화를 위하여 기본적으로 false입니다.

    Default

    false
    
  • Optional refreshExpiredTiles?: boolean

    false일 시, HTTP cacheControl / expires 헤더가 만료됐을 때 타일을 다시 요청하지 않습니다.

    Default

    true
    
  • Optional maxBounds?: LngLatBoundsLike

    해당 옵션을 설정하면, 지도가 설정 범위로 경계가 제한됩니다. [[남서쪽, 북동쪽], [남서쪽, 북동쪽]] 형식 또는 [서쪽, 남쪽, 동쪽, 북쪽] 순서의 숫자 배열로 설정할 수 있습니다.

    Example

    maxBounds : [[127.015422, 37.49044],[127.017422, 37.49444]]
    
    maxBounds : [127.015422, 37.49044, 127.017422, 37.49444]
    
  • Optional scrollZoom?: boolean

    마우스 스크롤로 확대/축소 할 수 있는지 여부입니다.

    Default

    true
    
  • Optional boxZoom?: boolean

    박스 줌 가능 여부입니다. true로 설정하면, shift 눌렀을 때 마우스 드래그로 박스를 만들어 줌 할 수 있습니다.

    Default

    true
    
  • Optional dragRotate?: boolean

    드래그로 지도 회전 가능 여부입니다. true로 설정하면, 오른쪽 마우스를 누르거나 ctrl 키 눌렀을 때 드래그 하면 지도를 회전시킬 수 있습니다.

    Default

    true
    
  • Optional dragPan?: DragPanOptions | boolean

    드래그로 지도 이동 가능 여부입니다. true로 설정하면, 드래그로 지도를 이동시킬 수 있습니다.

    Default

    true
    
  • Optional keyboard?: boolean

    키보드 단축키로 지도 사용 가능 여부입니다.

    • =/+ : 확대/축소 수준을 1씩 높입니다.
    • shift-=/shift-+ : 배율을 2배 높입니다.
    • - : 확대/축소 수준을 1씩 줄입니다.
    • shift-- : 확대/축소 수준을 2씩 줄입니다.
    • 화살표 키 : 100픽셀씩 이동합니다.
    • shift+→ : 회전을 15도 높입니다.
    • shift+← : 회전을 15도 줄입니다.
    • shift+↑ : 피치를 10도 높입니다.
    • shift+↓ : 피치를 10도 내립니다.

    Default

    true
    
  • Optional doubleClickZoom?: boolean

    더블클릭으로 지도 줌 가능 여부입니다.

    Default

    true
    
  • Optional touchZoomRotate?: boolean

    터치로 지도 줌 가능 여부입니다.

    Default

    true
    
  • Optional touchPitch?: boolean

    터치로 지도 피치 조정 가능 여부입니다.

    Default

    true
    
  • Optional cooperativeGestures?: boolean | GestureOptions

    지도 제스처 도움말입니다. true 또는 GestureOptions 개체로 설정된 경우, 지도 제스처 도움말을 확인할 수 있습니다.

    Example

      cooperativeGestures: {
    windowsHelpText: "마우스 스크롤로 지도 줌",
    macHelpText: "마우스 스크롤로 지도 줌",
    mobileHelpText: "2개의 손가락으로 지도 줌",
    }

    Default

    undefined
    
  • Optional trackResize?: boolean

    true면 브라우저 창의 크기가 조정될 때 지도의 크기가 자동으로 조절됩니다.

    Default

    true
    
  • Optional center?: LngLatLike

    지도의 초기 중심 위치입니다.

    Default

    [127.017422, 37.49144]
    
  • Optional zoom?: number

    지도의 초기 확대/축소 수준입니다.

    Default

    6
    
  • Optional bearing?: number

    지도의 초기 회전 각도입니다.

    Default

    0
    
  • Optional pitch?: number

    지도의 초기 pitch(기울기)입니다.

    Default

    0
    
  • Optional maxTileCacheSize?: number

    타일 캐시에 저장된 최대 타일 수입니다. maxTileCacheZoomLevels를 생략하면 캐시 크기가 동적으로 조정됩니다.

    Default

    null
    
  • Optional maxTileCacheZoomLevels?: number

    지정된 소스에 대한 타일을 저장할 최대 확대/축소 수준 수입니다. 타일 캐시 동적 크기는 지정된 소스에 대한 뷰포트의 대략적인 타일 수에 maxTileCacheZoomLevels를 곱하여 계산됩니다.

    Default

    5
    
  • Optional transformRequest?: RequestTransformFunction

    지도가 외부 URL을 요청하기 전에 실행되는 콜백함수입니다. 콜백함수를 사용하여 URL을 수정하거나 헤더를 설정하거나 자격증명속성을 설정할 수 있습니다.

  • Optional transformCameraUpdate?: CameraUpdateTransformFunction

    사용자 입력 또는 애니메이션으로 인해 지도의 카메라가 이동하기 전에 실행되는 콜백함수입니다. 콜백함수를 사용하여 center, zoom, bearing, pitch를 수정할 수 있습니다.

  • Optional fadeDuration?: number

    맵 로드 후, label 충돌을 방지하기 위한 fade in/fade out 애니메이션 지속 시간입니다.(단위: 밀리초)

    Default

    300
    
  • Optional crossSourceCollisions?: boolean

    true이면 충돌 감지 중에 여러 source의 기호가 서로 충돌할 수 있습니다. false이면 각 source의 기호에 대해 충돌 감지가 별도로 실행됩니다.

    Default

    true
    
  • Optional collectResourceTiming?: boolean

    true이면 GeoJSON 또는 벡터타일 웹워커 요청에 의해 Resource Timing API 정보가 수집됩니다. 수집된 정보는 관련 데이터 이벤트의 resourceTiming 속성으로 반환됩니다.

    Default

    false
    
  • Optional bounds?: LngLatBoundsLike

    지도의 초기 경계입니다. [[남서쪽, 북동쪽], [남서쪽, 북동쪽]] 형식 또는 [서쪽, 남쪽, 동쪽, 북쪽] 순서의 숫자 배열로 설정할 수 있습니다.

    Example

    bounds : [[127.015422, 37.49044],[127.017422, 37.49444]]
    
    bounds : [127.015422, 37.49044, 127.017422, 37.49444]
    
  • Optional fitBoundsOptions?: Object

    bounds 사용 시 설정하는 fitBounds 옵션입니다. Map의 FitBound메소드로도 bounds 및 옵션을 설정할 수 있습니다.

  • Optional localIdeographFontFamily?: string

    'CJK Unified Ideographs', '히라가나', '가타카나', '한글 음절' 범위에서 글리프 생성을 지역적으로 재정의하기 위한 CSS 글꼴모음을 정의합니다. 광범위한 글리프 요청을 방지하기 위해 사용합니다.

    • true이면 글꼴 가중치 키워드를 제외하고 글꼴 설정이 무시됩니다.
    • false이면 지도 스타일의 글꼴 설정이 가능합니다.

    Default

    sans-serif

  • Optional pixelRatio?: number

    픽셀 비율입니다.

    • canvas width : container.clientWidth * pixelRatio
    • canvas height : container.clientHeight * pixelRatio

    Default

    기기픽셀비율
    
  • Optional validateStyle?: boolean

    style 유효성 검사 여부입니다. 프로덕션 환경에서 유용합니다.

    Default

    true
    

Generated using TypeDoc