티스토리 뷰
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' 후의 위치와 같다.
'Skill > OpenLayers' 카테고리의 다른 글
[openLayers] 좌표 Array(배열)을 통한 Feature 생성 (0) | 2020.10.27 |
---|---|
[openLayers] ol.Interaction.Modify 이동 후의 위치 알아내기 (0) | 2020.10.26 |
[openLayers] ol.interaction.Snap사용법 (0) | 2020.10.26 |
[OpenLayers] 지도를 원하는 위치와 Zoom으로 조정하기 (0) | 2020.10.07 |
[OpenLayers] 다중 레이어중 원하는 레이어에서 선택 가능하도록 (0) | 2020.10.07 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- devtools
- PostgreSQL
- 여러 컬럼 update
- 전후방탐색
- setter
- Keycode
- ul li로 테이블
- lombok
- CSS
- DatePicker
- QueryDSL
- @ExceptionHandler
- spring
- JQuery
- caniuse
- element위치
- $.each
- border-collapse
- getter
- 정규식
- springboot
- 진열사랑
- oracle
- sumifs
- 프로젝트명변경
- $.extend
- excel
- Javascript
- draw.io
- object key
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함