VectorSource 입니다. 벡터 타일의 모든 기하학적 좌표는 -1 * extent(extent * 2) - 1사이에 존재해야 합니다. 벡터 소스를 사용하는 모든 레이어는 source-layer값을 특정해야 합니다.

[VectorSource 생성 방법]

Example

let style:ktGms.style.LineStyle = new ktGms.style.LineStyle(
{
"line-color": "#ff0000",
"line-opacity":1,
"line-width": 1.5
}, {
visibility:'visible'
});
let source:ktGms.source.VectorSource = new ktGms.source.VectorSource('sourceId', {
tiles:['https://map.gis.kt.com/vtile/mvt3/ctt/{z}/{x}/{y}.pbf'],
minzoom:6,
maxzoom:22,
defaultLayer:'ctt'
});
* // 소스는 스타일 세부정보가 포함되어 있지 않기 때문에 레이어와 함께 사용해서 지도에 데이터 표출이 가능합니다.
map.on(ktGms.event.MapDefaultEvent.type.load, (event:ktGms.event.MapDefaultEvent) => {
let layer:ktGms.layer.LineLayer = new ktGms.layer.LineLayer('layerId', style, source);
layer.addTo(map);
});

See

LineLayer and VectorSource LineLayer 소스로 VectorSource을 사용하는 예제

Hierarchy

  • VectorSource

Implements

Constructors

  • VectorSource class의 생성자입니다.

    Parameters

    • id: string

      생성할 VectorSource의 id입니다.

    • options: VectorSourceOption

      생성할 VectorSourceOption의 옵션입니다.

    Returns VectorSource

Properties

id: string

생성할 소스의 id입니다. 지도에 소스를 추가할 때는 중복되는 소스 id를 허용하지 않습니다.

url?: string

TileJSON의 resource url입니다.

tiles?: string[]

하나 이상의 TileJSON spec source의 url입니다.

bounds?: [number, number, number, number]

source의 bounding box를 지정할 수 있습니다. bounding box의 남서쪽 끝 좌표, 북동쪽 끝 좌표를 입력으로 받습니다. 각 좌표는 [남서 끝 좌표의 경도, 남서 끝 좌표의 위도, 북동 끝 좌표의 경도, 북동 끝 좌표의 위도]를 의미합니다. 해당 property가 소스에 포함되는 경우 경계 밖의 타일은 요청되지 않습니다.

Default

[-180,-85.051129,180,85.051129]
scheme?: "xyz" | "tms"

타일 좌표의 y축 방향에 영향을 줍니다. global-mercator(Spherical Mercator) profile이 가정됩니다.

  • xyz : Slippy map 타일 체계
  • tms : OSGeo 스펙 체계
minzoom?: number

TileJSON spec에서 사용 가능한 줌 레벨을 의미합니다.

Default

0
maxzoom?: number

TileJSON spec에서 사용 가능한 줌 레벨을 의미합니다. maxzoom에서의 타일은 더 높은 줌 레벨을 나타내는데에 사용됩니다.

Default

22
attribution?: string

맵이 사용자에게 보여질 때 표출될 attribution입니다.

promoteId?: PromoteIdSpecification

feature id로 사용할 속성입니다. 속성명 또는 {<sourceLayer>: <propertyName>}와 같은 형식을 사용할 수 있습니다. 만약 벡터 타일 소스에 string으로 값을 지정한 경우 모든 소스 레이어에서 동일한 속성이 사용됩니다.

volatile?: boolean

로컬에 소스 타일을 cache 저장할지에 대한 여부입니다.

Default

false
defaultLayer?: string

VectorSource는 mvt 타입에 여러 지리정보를 Layer 형태로 가지고 있습니다. 많은 Layer중에 노출 시킬 Layer의 명칭을 정의합니다.

Default

undefined
map?: Map

Methods

  • VectorSource 소스 타입에 필요한 명세 객체를 만들어주는 함수입니다.

    Returns VectorSourceOption

  • 지도에 VectorSource를 추가합니다. 이미 동일한 id의 소스가 존재하는 경우 VectorSource는 추가되지 않습니다.

    Parameters

    • map: Map

      레이어를 추가할 맵입니다.

    Returns void

Generated using TypeDoc