Share via


SourceManager interface

지도 컨트롤의 원본에 대한 관리자입니다. 아틀라스의 sources 속성을 통해 노출됩니다. Map 클래스입니다. 사용자가 인스턴스화할 수 없습니다.

메서드

add(Source | Source[])

하나 이상의 데이터 원본을 맵에 추가합니다. 원본을 추가하려면 먼저 맵을 준비해야 합니다. 이벤트 형식이 'ready'인 map.events.add 메서드를 사용합니다.

clear()

맵에서 모든 원본을 제거합니다.

getById(string)

지정된 ID를 사용하여 원본을 검색합니다.

getFeatureState(string | Shape | Feature<atlas.data.Geometry, any>, string | Source, string)

기능의 상태를 가져옵니다.

getRenderedShapes(string | Source, Expression, string)

지정된 필터와 일치하는 원본의 렌더링된 도형 기능을 모두 반환합니다. 원본이 벡터 타일 원본인 경우 원본 계층 이름을 지정해야 합니다.

getSources()

맵에 추가된 모든 원본을 검색합니다.

isSourceLoaded(string | Source)

원본이 로드되었는지 여부를 나타내는 부울을 반환합니다.

remove(string | Source | Array<string | Source>)

원본 ID를 지정하거나 원본 자체를 제공하여 맵에서 하나 이상의 원본을 제거합니다.

removeFeatureState(string | Shape | Feature<atlas.data.Geometry, any>, string | Source, string, string)

기능 상태의 상태 또는 단일 키 값을 제거합니다.

setFeatureState(string | Shape | Feature<atlas.data.Geometry, any>, string | Source, object, string)

키 값 쌍 개체를 전달하여 기능의 상태를 설정합니다.

메서드 세부 정보

add(Source | Source[])

하나 이상의 데이터 원본을 맵에 추가합니다. 원본을 추가하려면 먼저 맵을 준비해야 합니다. 이벤트 형식이 'ready'인 map.events.add 메서드를 사용합니다.

function add(source: Source | Source[])

매개 변수

source

Source | Source[]

clear()

맵에서 모든 원본을 제거합니다.

function clear()

getById(string)

지정된 ID를 사용하여 원본을 검색합니다.

function getById(id: string): Source

매개 변수

id

string

반환

getFeatureState(string | Shape | Feature<atlas.data.Geometry, any>, string | Source, string)

기능의 상태를 가져옵니다.

function getFeatureState(feature: string | Shape | Feature<atlas.data.Geometry, any>, source: string | Source, sourceLayer?: string): object

매개 변수

feature

string | Shape | Feature<Geometry, any>

기능의 ID

source

string | Source

원본의 ID

sourceLayer

string

계층의 ID

반환

object

getRenderedShapes(string | Source, Expression, string)

지정된 필터와 일치하는 원본의 렌더링된 도형 기능을 모두 반환합니다. 원본이 벡터 타일 원본인 경우 원본 계층 이름을 지정해야 합니다.

function getRenderedShapes(source: string | Source, filter?: Expression, sourceLayer?: string): Array<Feature<atlas.data.Geometry, any> | Shape>

매개 변수

source

string | Source

쿼리할 원본

filter
Expression

쿼리를 제한하는 필터

sourceLayer

string

셰이프와 기능이 일치하는 레이어

반환

Array<Feature<Geometry, any> | Shape>

getSources()

맵에 추가된 모든 원본을 검색합니다.

function getSources(): Source[]

반환

Source[]

isSourceLoaded(string | Source)

원본이 로드되었는지 여부를 나타내는 부울을 반환합니다.

function isSourceLoaded(source: string | Source): boolean

매개 변수

source

string | Source

원본 또는 Source 개체의 ID입니다.

반환

boolean

remove(string | Source | Array<string | Source>)

원본 ID를 지정하거나 원본 자체를 제공하여 맵에서 하나 이상의 원본을 제거합니다.

function remove(source: string | Source | Array<string | Source>)

매개 변수

source

string | Source | Array<string | Source>

removeFeatureState(string | Shape | Feature<atlas.data.Geometry, any>, string | Source, string, string)

기능 상태의 상태 또는 단일 키 값을 제거합니다.

function removeFeatureState(feature: string | Shape | Feature<atlas.data.Geometry, any>, source: string | Source, sourceLayer?: string, key?: string)

매개 변수

feature

string | Shape | Feature<Geometry, any>

기능의 ID

source

string | Source

원본의 ID

sourceLayer

string

계층의 ID

key

string

업데이트할 기능 상태의 키

setFeatureState(string | Shape | Feature<atlas.data.Geometry, any>, string | Source, object, string)

키 값 쌍 개체를 전달하여 기능의 상태를 설정합니다.

function setFeatureState(feature: string | Shape | Feature<atlas.data.Geometry, any>, source: string | Source, state: object, sourceLayer?: string)

매개 변수

feature

string | Shape | Feature<Geometry, any>

기능의 ID

source

string | Source

원본의 ID

state

object

sourceLayer

string

계층의 ID