interface IFocusTo {
    focus: {
        ids?: string[];
        type: FOCUS_TYPE;
    };
    maxZoom?: number;
    padding?: {
        bottom: number;
        left: number;
        right: number;
        top: number;
    };
    transition: boolean;
}

Properties

focus: {
    ids?: string[];
    type: FOCUS_TYPE;
}

focus 할 type, ids array

Type declaration

  • Optional ids?: string[]

    ['OB-mxanpdYA1T2410', 'OB-aN7fGeVoze1959', 'OB-ccjURqW8hq1959'] or ['PO-J0kWyrOGc9580', 'PO-9le4rxRll4944', 'PO-F_ATx-YIl2518', 'PO-tr5lOOTh47276']

  • type: FOCUS_TYPE

    focus type / FOCUS_TYPE = 'OBJECT' | 'OBJECT_ALL' | 'NAVIGATION' | 'POI' | 'POI_ALL'

maxZoom?: number

focus시에 최대 줌 레벨 제한값

설정하면 포커스 대상의 Bounding Box가 작아도 이 줌 레벨을 초과하여 줌인하지 않습니다. 미설정(undefined)시 기존 동작과 동일하게 Bounding Box에 맞추어 최대한 줌인합니다.

padding과 함께 사용 가능하며, 최종 줌 레벨은 min(padding 적용 후 줌, maxZoom)으로 결정됩니다.

Example

map.control.focusTo({
focus: { type: 'POI', ids: ['poiId1', 'poiId2'] },
transition: true,
maxZoom: 20,
})
padding?: {
    bottom: number;
    left: number;
    right: number;
    top: number;
}

focus시에 padding 값

Type declaration

  • bottom: number
  • left: number
  • right: number
  • top: number
transition: boolean

focus시에 transition 여부