Namespace: uGisUtil

ugmp.util.uGisUtil

uGisMapPlatForm 유틸리티.

uGisMapPlatForm에서 자주 사용하는 유틸리티 객체.

Methods

appendParams(uri, params){String}

JSON 파라미터를 URI에 GET 방식으로 붙인다.

Name Type Description
uri String

URI.

params Object

추가할 JSON 파라미터 객체.

Returns:
uri JSON 파라미터가 추가된 URI.

cloneFeature(feature){ol.Feature}

피처를 복사한다.

※window 객체가 다를 경우(window.open) 생성자가 다르므로 instanceof 가 성립되지 않는 문제 해결 방안.

Name Type Description
feature ol.Feature

복사할 피처 객체.

Returns:
cloneFt 복사한 피처.

cloneFeatures(feature){Array.<ol.Feature>}

피처리스트를 복사한다.

※window 객체가 다를 경우(window.open) 생성자가 다르므로 instanceof 가 성립되지 않는 문제 해결 방안.

Name Type Description
feature Array.<ol.Feature>

복사할 피처리스트 객체.

Returns:
array 복사한 피처리스트.

cloneGeometry(geometry){ol.geom}

geometry 객체를 복사한다.

※window 객체가 다를 경우(window.open) 생성자가 다르므로 instanceof 가 성립되지 않는 문제 해결 방안.

Name Type Description
geometry ol.geom

복사할 geometry 객체.

Returns:
복사한 geometry 객체.

cloneStyle(style){ol.style.Style}

스타일을 복사한다.

※window 객체가 다를 경우(window.open) 생성자가 다르므로 instanceof 가 성립되지 않는 문제 해결 방안.

Name Type Description
style ol.style.Style

복사할 스타일 객체.

Returns:
style 복사한 스타일.

generateUUID(){String}

UUID 생성를 생성한다.

Returns:
uuid UUID.

isXMLDoc(a){Boolean}

객체가 Document인지 체크한다.

Name Type Description
a Object

체크할 객체.

Returns:
b 해당 객체가 Document면 true 아니면 false.

numberWithCommas(num){String}

숫자 1000단위 콤마 표시.

Name Type Description
num Number | String

숫자.

Returns:
1000단위 (세 자리마다 콤마 표시).

objectMerge(){Object}

두 객체를 병합한다. 중복된 Key의 데이터일 경우 덮어쓴다.

Returns:
object 병합된 Object.

setCssTextStyle(el, style, value)

DOM Element 스타일 추가/업데이트 한다.

Name Type Description
el Element

대상 Element.

style String

적용할 스타일명.

value String

스타일 속성.

xmlToJson(xml){Object}

XML을 JSON으로 변환한다.

Name Type Description
xml Document

XML.

Returns:
obj JSON.