Има ли начин да се създаде нов слой от селекция на DragBox?
Ето моето взаимодействие с DragBox:
/* create drag box */
this.dragBox = new ol.interaction.DragBox({
/* dragbox interaction is active only if alt key is pressed */
condition: ol.events.condition.altKeyOnly,
/* style the box */
style: new ol.style.Style({
stroke: new ol.style.Stroke({
color: [0, 0, 255, 1]
})
})
});
/* add the DragBox interaction to the map */
this.map.addInteraction(this.dragBox);
При събитието boxend искам да създам нов слой, използвайки данните в моята ограничителна кутия. Как мога да направя това?