티스토리 뷰

var features = gisApp.gisMap.select.getFeatures().getArray();
console.log(features[0]);
console.log(features[0].getGeometry().getCoordinates());

ol.Interaction.Modify 통해 Point를 이동시킨 후 'modifyend' listener에서 움직인 Point의 위치 알아내기

var map = gisMap.mainMap;    
this.modify = new ol.interaction.Modify({
	features: this.select.getFeatures()
});
map.addInteraction(this.modify);

this.modify.on('modifyend',function(e){
	console.log("addModifyInteraction.modifyend 이벤트 후 작업");
	_callback(e);
    
	var features = e.features.getArray();
	var coord = features[0].getGeometry().getCoordinates();
	var dataRow = features[0].getProperties();
});

 

다시 select 위치를 출력해 보면  'modifyend' 후의 위치와 같다.

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함