MapChart
RealMap 라이브러리의 맵차트 모델.
Properties
bubbleScale: BubbleScale  readonly
첫번째 bubble scale.
default :undefined
colorScale: ColorScale  readonly
첫번째 color scale.
default :undefined
credits: Credits  readonly
Credits.
default :undefined
drilldownPanel: DrilldownPanel  readonly
drilldown panel.
default :undefined
exporter: Exporter  readonly
맵차트 내보내기 관련 설정 모델.
default :undefined
firstMapSeries: MapSeries  readonly
맵차트에 설정된 첫번째 맵시리즈.
시리즈 개요 및
시리즈 설정을 참조한다.
default :undefined
legend: Legend  readonly
첫번째 legend.
default :undefined
map: MapModel  readonly
setBaseMap으로 지정되거나,
기본적으로 첫번째 enabled인 맵 모델.
default :undefined
selection: MapSelection  readonly
선택 모델.
default :undefined
series: Series  readonly
맵차트에 설정된 첫번째 시리즈.
시리즈 개요 및
시리즈 설정을 참조한다.
default :undefined
subtitle: Subtitle  readonly
맵차트 부제목 모델.
default :undefined
title: Title  readonly
맵차트 타이틀 모델.
default :undefined
tooltip: Tooltip  readonly
툴팁 모델.
default :undefined
type: string (opens in a new tab)  readonly
기본 시리즈 종류.
시리즈에 type을 지정하지 않으면 이 속성 type의 시리즈로 생성된다.
default :undefined
widgetGroup: MapWidgetGroup  readonly
첫번째 widget group.
default :undefined
zoomPanel: ZoomPanel  readonly
zoom panel.
default :undefined
Methods
addSeries(source, animate?): Series<SeriesOptions>
시리즈를 추가한다.
| Parameter | Type | Description | 
|---|---|---|
| source | any (opens in a new tab) | 시리즈 설정 json. | 
animate=true | boolean (opens in a new tab) | 애니메이션 실행 여부. | 
return 생성된 시리즈 객체.
export(options): void (opens in a new tab)
현재 표시 중인 맵차트를 PNG, JPG 또는 SVG 벡터 이미지로 다운로드한다.
chart.export({
     type: 'png',
     fileName: 'realmap'
})| Parameter | Type | Description | 
|---|---|---|
| options | ExportOptions | 내보내기 설정 객체 | 
getAnnotation(name): Annotation<AnnotationOptions>
Annotation 이름에 해당하는 Annotation 객체를 리턴한다.
| Parameter | Type | Description | 
|---|---|---|
| name | string (opens in a new tab) | Annotation 이름 | 
return Annotation 객체
getMap(name): MapModel
이름이나 index에 해당하는 맵 객체를 리턴한다.
| Parameter | Type | Description | 
|---|---|---|
| name | string (opens in a new tab)  |  number (opens in a new tab) | 맵 이름 또는 index. | 
return 맵 객체
getPoint(id): MapCoord
맵차트 설정의 map.points로 지정한 위치를 리턴한다.
| Parameter | Type | Description | 
|---|---|---|
| id | string (opens in a new tab) | 포인트 키. | 
return [lon, lat]
getSeries(name): Series<SeriesOptions>
이름이나 index에 해당하는 시리즈 객체를 리턴한다.
| Parameter | Type | Description | 
|---|---|---|
| name | string (opens in a new tab)  |  number (opens in a new tab) | 시리즈 이름 또는 index. | 
return 시리즈 객체
load(config, loadAnimation?, callback?): MapChart
기존 모델 설정을 모두 제거하고 초기화 한 후,
config로 전달된 설정에 따라 맵차트를 새로 구성한다.
기존에 생성되었던 시리즈나 게이지들과 축들이 모두 제거되고 새로 생성된다.
| Parameter | Type | Description | 
|---|---|---|
| config | ChartConfiguration | 맵차트 설정 정보 | 
loadAnimation=false | boolean (opens in a new tab) | |
| callback | (args: LoadCallbackArgs) => void (opens in a new tab) | 
loadAsync(config, loadAnimation?, callback?): Promise (opens in a new tab)<MapChart>
load 메서드의 async 버전. 
기존 모델 설정을 모두 제거하고 초기화 한 후,
config로 전달된 설정에 따라 맵차트를 새로 구성한다.
기존에 생성되었던 시리즈나 게이지들과 축들이 모두 제거되고 새로 생성된다.
또한 map과 series 옵션에 url 속성이 있는 경우, 해당 url에서 데이터를 가져온 다음, 
각 옵션의 map 또는 data 속성을 채운다.
| Parameter | Type | Description | 
|---|---|---|
| config | ChartConfiguration | 맵차트 설정 정보 | 
loadAnimation=false | boolean (opens in a new tab) | |
| callback | () => void (opens in a new tab) | 
pointToMap(x, y): MapCoord
픽셀 좌표를 경위도 좌표로 변환한다. 
픽셀 좌표는 맵차트 영역의 왼쪽 위 모서리를 (0,0)으로 하는 좌표계이다. 
차트가 아직 그려지지 않은 상태에서는 NaN이 담긴 배열을 반환하는 점에 주의.
LoadCallback이 호출된 시점부터 이용할 수 있다.
| Parameter | Type | Description | 
|---|---|---|
| x | number (opens in a new tab) | 픽셀 X 좌표 | 
| y | number (opens in a new tab) | 픽셀 Y 좌표 | 
return 경위도 좌표 [lon, lat]
removeSeries(series, animate?): void (opens in a new tab)
기존 시리즈를 제거한다.
| Parameter | Type | Description | 
|---|---|---|
| series | string (opens in a new tab)  |  Series<SeriesOptions> | 시리즈 이름이나 시리즈 객체. | 
animate=true | boolean (opens in a new tab) | 애니메이션 실행 여부. | 
render(now?): void (opens in a new tab)
다음 rendering frame을 기다리지 않고, 맵차트를 즉시 다시 그린다.
맵차트 rendering 작업은 자원 소모가 많고 소용 시간도 적지 않으므로,
data나 여러 모델을 수정하는 경우 모든 작업이 완료된 후 한 번 호출해야 한다.
가능하면 이 함수는 호출하지 않고
맵차트 기본 동작(다음 frame에 이전 변경 사항들을 모아서 한 번 rendering)으로 실행되게 해야 한다.
| Parameter | Type | 
|---|---|
now=true | boolean (opens in a new tab) | 
seriesByType(type): Series<SeriesOptions>
지정한 type에 해당하는 첫번째 시리즈 객체를 리턴한다.
| Parameter | Type | Description | 
|---|---|---|
| type | string (opens in a new tab) | 시리즈 타입 | 
return 시리즈 객체
setBaseMap(indexOrName?): void (opens in a new tab)
맵차트 축의 기준이 되는 맵 모델을 지정한다.
매개변수를 지정하지 않거나 잘못된 값을 넘기면 첫번째 enabled인 맵으로 설정된다.
| Parameter | Type | 
|---|---|
| indexOrName | string (opens in a new tab)  |  number (opens in a new tab) | 
updateOptions(options, render?): void (opens in a new tab)
load와 달리 기존 모델을 유지하면서 맵차트 설정 일부를 반영한다.
| Parameter | Type | Description | 
|---|---|---|
| options | ChartConfiguration | 설정 객체 | 
render=true | boolean (opens in a new tab) | true로 지정하면 다시 그리도록 요청한다. |