I'm pretty new to Openlayers and I have a problem.I can draw a rectangle using DragBox on my OpenLayers 3 map. How can I get it's coordinates? I tried getGeometry() but it returns 'null'. I think I just added the 'drawing dragbox feature' to my map and I am not creating an actual rectangle. I am going to use the area inside these coordinates later. Here is my code:
boxControl =new ol.interaction.DragBox ({ condition: ol.events.condition.altKeyOnly, style: new ol.style.Style ({ stroke: new ol.style.Stroke({color: [0, 0, 255, 1]}) }) }); map.addInteraction(boxControl); Thanks in advance. OpenLayers 3 is pretty new and most of the resources on the web are for 2.x and I couldn't find any help.
أكثر...
boxControl =new ol.interaction.DragBox ({ condition: ol.events.condition.altKeyOnly, style: new ol.style.Style ({ stroke: new ol.style.Stroke({color: [0, 0, 255, 1]}) }) }); map.addInteraction(boxControl); Thanks in advance. OpenLayers 3 is pretty new and most of the resources on the web are for 2.x and I couldn't find any help.
أكثر...