API
Body

Body extends ChartItem

시리즈, annotation, axis grid 및 guide 등이 표시되는 차트 주 영역 모델.
설정 모델은 BodyOptions이다.

Properties

center: MapCoord readonly

현재 표시된 상태의 맵 중앙 좌표.

default :undefined

map: MapModel readonly

map

default :undefined

panX: number (opens in a new tab) readonly

pan x

default :undefined

panY: number (opens in a new tab) readonly

pan y

default :undefined

rotationX: number (opens in a new tab) readonly

rotation x of globe.

default :undefined

rotationY: number (opens in a new tab) readonly

rotation y of globe.

default :undefined

scale: number (opens in a new tab) readonly

map scale

default :undefined

scroll: number (opens in a new tab) readonly

scroll

default :undefined

visible: boolean (opens in a new tab) readonly

표시 여부.
options.visible 값을 그대로 return하는 것이 아니라, undefinednull 등으로 지정하는 경우 모델의 상태에 따라 truefalse로 해석될 수 있다.
설정의 경우 updateOptions({visible: value})로 지정하는 것과 동일하다.

default :undefined

zoom: number (opens in a new tab) readonly

zoom

default :undefined

Methods

$_calcWMap(): { | | w | : | | number (opens in a new tab) | ; | x1 | : | | number (opens in a new tab) | ; | x2 | : | | number (opens in a new tab) | ; | | }

지도의 너비를 계산한다.

EqualEarth와 같이 위도가 x 좌표 계산에 영향을 주는 경우, 지도 너비 계산이 어려워진다. 좌표 투영에 오프셋(scroll)이 적용된 경우, 오프셋에 따라 x2 - x1의 결과가 계속 달라진다. wMap의 값이 계속 달라진다면, scale값도 영향을 받아서 값이 매번 달라진다. 그러므로, 스크롤이 0일 때를 기준으로 x2 - x1값을 구해서 wMap의 값으로 사용해야 한다.

return 지도의 너비

destroy(): null

객체가 소유한 참조 등을 해제하고 null을 리턴한다.

list = lis.destroy();

return null

focusTo(target, duration?): void (opens in a new tab)

지정한 지점이나 area의 center가 중앙이 되도록 이동한다.

ParameterTypeDescription
targetMapCoord지점 좌표 또는 area id.
duration=500number (opens in a new tab)

zoomTo(zoom, target, duration?): void (opens in a new tab)

지정한 좌표로 zoom하고 area center로 이동한다.

ParameterTypeDescription
zoomnumber (opens in a new tab)줌 배율
targetMapCoord지정한 좌표
duration=300number (opens in a new tab)animation duration

zoomToArea(areaId, ratio?, duration?): void (opens in a new tab)

지정한 area가 모두 표시되는 정도로 zoom하고 area center로 이동한다.

ParameterTypeDescription
areaIdstring (opens in a new tab)
ratio=0.7number (opens in a new tab)지정한 area를 ratio만큼 확대한다. ratio는 0보다 크고 1 이하. 기본값은 0.7
duration=300number (opens in a new tab)animation duration

zoomToBounds(from, to, duration?): void (opens in a new tab)

떨어진 두 위치로 정해지는 영역이 모두 표시되도록 zoom(in/out)하고 영역 중앙으로 이동한다.

ParameterType
fromMapCoord
toMapCoord
duration=300number (opens in a new tab)