ImageSource 입니다. 이미지의 url을 통해 이미지를 맵에 추가할 수 있습니다.

[ImageSource 생성 방법]

Example

let source_image:ktGms.source.ImageSource = new ktGms.source.ImageSource('imgSource',{
"url" : "https://maplibre.org/maplibre-gl-js/docs/assets/radar1.gif",
"coordinates":[
[127.007422, 37.50144],
[127.027422, 37.50144],
[127.027422, 37.48144],
[127.007422, 37.48144]
]});

let style:ktGms.style.RasterStyle = new ktGms.style.RasterStyle(
{ "raster-opacity" : 0.7},
{ "visibility" : 'visible'}
);

// 소스는 스타일 세부정보가 포함되어 있지 않기 때문에 레이어와 함께 사용해서 지도에 데이터 표출이 가능합니다.
map.on(ktGms.event.MapDefaultEvent.eventName.load, (event:ktGms.event.MapDefaultEvent) => {
new ktGms.layer.RasterLayer("rasterLayer", style, source_image).addTo(map);
});

See

RasterLayer and ImageSource RasterLayer 소스로 ImageSource을 사용하는 예제

Hierarchy

  • ImageSource

Implements

Constructors

Properties

Methods

Constructors

  • ImageSource class의 생성자입니다.

    Parameters

    • id: string

      생성할 ImageSource의 id입니다.

    • options: ImageSourceOption

      생성할 ImageSource의 옵션입니다.

    Returns ImageSource

Properties

id: string

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

url?: string

맵에 추가할 이미지 소스의 url입니다.

coordinates?: coordinates

이미지의 각 꼭지점의 좌표를 의미합니다. 각 꼭지점은 [longitude, latitude] 쌍으로, 왼쪽 위부터 시계방향 순서입니다.

Example

"coordinates": [
[-122.51596391201019, 37.56238816766053],
[-122.51467645168304, 37.56410183312965],
[-122.51309394836426, 37.563391708549425],
[-122.51423120498657, 37.56161849366671]
]
map?: Map

Methods

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

    Returns ImageSourceOption

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

    Parameters

    • map: Map

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

    Returns void

Generated using TypeDoc