Yahoo! UI Library

CHZERO  1.0.0

Yahoo! UI Library > CHZERO > OpenLayers.Layer.Vector
Search:
 
Filters

Class OpenLayers.Layer.Vector - extends OpenLayers.Layer

Known Subclasses:
CHZERO.Layer.ZeroMapVector
OpenLayers.Layer.Vector

Constructor

OpenLayers.Layer.Vector ( name , options )
Parameters:
name <String>
options <Object> 레이어 옵션 hashtable

Properties

EVENT_TYPES - final {Array(String)}

이벤트 타입
아래와 같이 이벤트 리스너를 등록하면 된다.
layer.events.register(type, obj, listener);
layer.events.unregister(type, obj, listener);
또는
layer.events.on({type:listener,"scope":obj});
layer.events.un({type:listener,"scope":obj});
지원하는 이벤트 타입 beforefeatureadded - feature 추가되기 전에 발생
beforefeaturesadded - feature array 추가 되기 전에 발생
featureadded - feature 추가되고 후에 발생
featuresadded - feature array 추가되고 후에 발생
beforefeatureremoved - feature 제거되기 전에 발생
beforefeaturesremoved - feature array 제거되기 전에 발생
featureremoved - feature 제거 후에 발생
featuresremoved - feature array 제거 후에 발생
beforefeatureselected - feature 선택 되기 전에 발생
featureselected - feature 선택 후에 발생
featureunselected - feature 선택 해제 후에 발생
beforefeaturemodified
featuremodified
afterfeaturemodified
vertexmodified
vertexremoved
sketchstarted
sketchmodified
sketchcomplete
refresh

features - {Array(OpenLayers.Feature.Vector)}


geometryType - {String}


isBaseLayer - {Boolean}

레이어가 base layer이면 true 아니면 false. 디폴트 false.

isFixed - {Boolean}


rendererOptions - {Object}


reportError - {Boolean}


style - {Object}


Methods

addFeatures

void addFeatures ( vector , options )
Parameters:
vector <Array(OpenLayers.Feature.Vector)>
options <Object>

destory

void destory ( )

destroyFeatures

void destroyFeatures ( options )
Parameters:
options <Object>

display

void display ( display )
레이어를 보여줄지 숨길지 설정
Parameters:
display <Boolean>

drawFeature

void drawFeature ( feature , style )
Parameters:
feature <OpenLayers.Feature.Vector>
style <String | Object>

getDataExtent

OpenLayers.Bounds | null getDataExtent ( )
Returns: OpenLayers.Bounds | null
bounds

getFeatureBy

OpenLayers.Feature.Vector getFeatureBy ( property , value )
Parameters:
property <String>
value <String>
Returns: OpenLayers.Feature.Vector
vector

getFeatureByFid

OpenLayers.Feature.Vector getFeatureByFid ( featureFid )
Parameters:
featureFid <String>
Returns: OpenLayers.Feature.Vector
vector

getFeatureById

OpenLayers.Feature.Vector getFeatureById ( featureId )
Parameters:
featureId <String>
Returns: OpenLayers.Feature.Vector
vector

getFeaturesByAttribute

Array(OpenLayers.Feature.Vector) getFeaturesByAttribute ( attrName , attrValue )
Parameters:
attrName <String>
attrValue <String>
Returns: Array(OpenLayers.Feature.Vector)
vector

onFeatureInsert

void onFeatureInsert ( feature )
feature insert 후 실행되어 진다. 디폴트는 빈함수. 오버라이드해서 구현
Parameters:
feature <OpenLayers.Feature.Vector>

preFeatureInsert

void preFeatureInsert ( feature )
Parameters:
feature <OpenLayers.Feature.Vector>

redraw

void redraw ( )
레이어를 다시 그림.

removeAllFeatures

void removeAllFeatures ( options )
Parameters:
options <Object>

removeFeatures

void removeFeatures ( features , options )
Parameters:
features <Array(OpenLayers.Feature.Vector)>
options <Object>


Copyright © 2012 Yahoo! Inc. All rights reserved.