Class: uGisMap

ugmp.uGisMap

new ugmp.uGisMap(opt_options)

uGisMapPlatForm 지도 객체.

다양한 타입의 레이어(ugmp.layer)를 추가할 수 있으며, 지도의 기본 객체이다.

Name Type Description
opt_options Object
Name Type Description
crs String

좌표계. Default is EPSG:3857.

center Array.<Number>

중심점. Default is [0, 0].

target String

지도가 그려질 DIV ID.

useAltKeyOnly Boolean

마우스 휠줌 스크롤 시 AltKey 조합 설정 사용 여부.

true면 AltKey를 누를 상태에서만 마우스 휠줌 스크롤 사용이 가능하다. Default is false.

useMaxExtent Boolean

이동할 수 있는 영역을 해당 좌표계의 최대 영역으로 한정한다. Default is false.

Example
var ugMap = new ugmp.uGisMap( {
	target : 'map',
	crs : 'EPSG:3857',
	center : [ 0, 0 ],
	useMaxExtent : true,
	useAltKeyOnly : false
} );

// ol.Map 객체에 직접 접근
ugMap.getMap().addLayer( new ol.layer.Tile( {
	source : new ol.source.OSM()
} ) );

// uGisMap에 WMS 레이어 추가
ugMap.addWMSLayer( {
	uWMSLayer : new ugmp.layer.uGisWMSLayer( {...} )
	...
} );

Methods

addClusterLayer(opt_options){Object}

Cluster 레이어를 추가한다.

Name Type Description
opt_options Object
Name Type Description
uClusterLayer ugmp.layer.uGisClusterLayer

ugmp.layer.uGisClusterLayer 객체.

Returns:
promise jQuery.Deferred.promise.

addVector3DLayer(opt_options){Object}

Vector3D 레이어를 추가한다.

Name Type Description
opt_options Object
Name Type Description
uVector3DLayer ugmp.layer.uGisVector3DLayer

ugmp.layer.uGisVector3DLayer 객체.

useExtent Boolean

레이어 추가 후 extent 설정 사용 여부.

true면 해당 레이어의 영역으로 지도 영역을 맞춘다. Default is false.

Returns:
promise jQuery.Deferred.promise.

addVectorLayer(opt_options){Object}

Vector 레이어를 추가한다.

Name Type Description
opt_options Object
Name Type Description
uVectorLayer ugmp.layer.uGisVectorLayer

ugmp.layer.uGisVectorLayer 객체.

useExtent Boolean

레이어 추가 후 extent 설정 사용 여부.

true면 해당 레이어의 영역으로 지도 영역을 맞춘다. Default is false.

Returns:
promise jQuery.Deferred.promise.

addWCSLayer(opt_options){Object}

WCS 레이어 추가

Name Type Description
opt_options Object
Name Type Description
uWCSLayer ugmp.layer.uGisWCSLayer

ugmp.layer.uGisWCSLayer 객체.

extent Array

레이어 추가 후 설정될 extent.

useExtent Boolean

레이어 추가 후 extent 설정 사용 여부. Default is false.

true면 해당 레이어의 영역으로 지도 영역을 맞춘다. Default is false.

extent가 정상적이지 않을 경우 ugmp.service.uGisGetCapabilitiesWCS의 extent로 설정.

Returns:
promise jQuery.Deferred.promise.

addWFSLayer(opt_options){Object}

WFS 레이어를 추가한다.

Name Type Description
opt_options Object
Name Type Description
uWFSLayer ugmp.layer.uGisWFSLayer

ugmp.layer.uGisWFSLayer 객체.

useExtent Boolean

레이어 추가 후 extent 설정 사용 여부.

true면 해당 레이어의 영역으로 지도 영역을 맞춘다. Default is false.

Returns:
promise jQuery.Deferred.promise.

addWMSLayer(opt_options){Object}

WMS 레이어를 추가한다.

Name Type Description
opt_options Object
Name Type Description
uWMSLayer ugmp.layer.uGisWMSLayer

ugmp.layer.uGisWMSLayer 객체.

extent Array.<Number>

레이어 추가 후 설정될 extent.

resolution Float

레이어 추가 후 설정될 resolution.

useExtent Boolean

레이어 추가 후 extent 설정 사용 여부.

true면 해당 레이어의 영역으로 지도 영역을 맞춘다. Default is false.

extent가 정상적이지 않을 경우 ugmp.service.uGisGetCapabilitiesWMS의 extent로 설정.

Returns:
promise jQuery.Deferred.promise.

addWMTSLayer(opt_options){Object}

WMTS 레이어를 추가한다.

Name Type Description
opt_options Object
Name Type Description
uWMTSLayer ugmp.layer.uGisWMTSLayer

ugmp.layer.uGisWMTSLayer 객체.

extent Array.<Number>

레이어 추가 후 설정될 extent.

useExtent Boolean

레이어 추가 후 extent 설정 사용 여부.

true면 해당 레이어의 영역으로 지도 영역을 맞춘다. Default is false.

extent가 정상적이지 않을 경우 ugmp.service.uGisGetCapabilitiesWMTS의 extent로 설정.

Returns:
promise jQuery.Deferred.promise.

calculateScale(opt_options){Double}

현재 지도에서 해당 Extent의 스케일을 계산한다.

Name Type Description
opt_options Object
Name Type Description
extent Array.<Number>

스케일을 계산할 Extent. Default is 현재 지도 영역.

originCRS String

레이어 원본 좌표계. Default is 현재 지도 좌표계.

Returns:
scale 스케일.

getCRS(){String}

현재 지도 좌표계를 가져온다.

Returns:
mapCRS 현재 지도 좌표계.

getDataViewId(){String}

현재 지도의 View ID를 가져온다. View ID는 고유값이므로 해당 지도의 Key로 사용한다.

Returns:
dataViewId View ID.

getLayers(layerType){Array.<ugmp.layer>}

현재 ugmp.uGisMap에 추가된 ugmp.layer 목록을 가져온다.

Name Type Description
layerType String

레이어 타입. (WMS, WFS, WMTS, Vector...)

Returns:
layers 레이어 목록.

getMap(){ol.Map}

현재 ugmp.uGisMap에 설정된 ol.Map 객체를 가져온다.

Returns:
olMap ol.Map 객체.

getScaleForZoom(zoom){Double}

현재 지도에서 해당 줌 레벨의 스케일을 계산한다.

Name Type Description
zoom Integer

줌 레벨.

Returns:
scale 스케일.

refresh()

지도 새로고침.

removeAllInteraction()

현재 지도에 등록된 모든 Interaction을 제거한다. (Default Interaction 제외)

removeAllListener(type)

현재 지도에 등록된 모든 이벤트리스너를 제거한다.

Name Type Description
type String

이벤트 타입

removeLayer(uGisLayerKey)

현재 ugmp.uGisMap에 등록된 ugmp.layer를 삭제한다.

Name Type Description
uGisLayerKey String

삭제할 ugmp.layer의 KEY.

setActiveAllInteraction(state)

현재 지도에 등록된 모든 Interaction 사용 설정. (Default Interaction 포함)

Name Type Description
state Boolean

사용 설정 값.

setAltKeyOnly(state)

마우스 휠줌 스크롤 시 AltKey 조합 설정 사용 여부를 설정한다.

Name Type Description
state Boolean

사용 설정 값.

setExtent(envelop)

지정된 Extent로 지도 영역 맞추기.

Name Type Description
envelop Array.<Double>

Extent.

setLoadingVisible(state)

로딩 심볼 표시 여부를 설정한다.

Name Type Description
state Boolean

사용 설정 값.