Questions tagged [draw-interaction]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
1answer
3k views

Get feature from ol.interaction.Draw on drawend

My problem seems simple but I cannot find any questions that successfully solve it. I want to draw a circle using ol.interaction.Draw, and access the feature that is created immediately. My code as ...
2
votes
1answer
248 views

Creating points projected on line using QGIS?

How can we create points perpendicularly on a line with QGis ? Otherwise, how can we draw a line between one point and a line ? Here is a picture to show what we want :
2
votes
1answer
937 views

Openlayers 3 - Line with two points

I'm trying to create a tool which enables the user to draw a linestring with only 2 points. It's surprising how long I've searched and can't find an example or someone asking the question. I know ...
2
votes
1answer
119 views

In OpenLayers how can I enable users to cancel the completion of a polygon, and carry on drawing it?

I am using the OpenLayers v4.6.5 Draw interaction. drawInteraction = new ol.interaction.Draw({...}); map.addInteraction(drawInteraction); I want users to be able to add properties to the features ...
2
votes
1answer
5k views

Openlayers drawing interaction geometryFunction

Can anyone help me to convert this function so that it is not dependant on the ol3-debug file as I don't know quite what is replaced upon build. The function works but only in debug mode. It is in ...
2
votes
0answers
34 views

Drawing an Ellipse in Openlayers 4 with interaction

In OpenLayers 2, I could easily create a Control to draw an ellipse like this: new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.RegularPolygon, { handlerOptions:...
1
vote
4answers
9k views

Problem in remove interaction after draw end in openlayers-3

I'm using OpenLayers-3.8.2. I have a draw Ineraction as follow: function drawEnd(){ map.removeInteraction(drawIneraction). } var drawInteraction = new ol.interaction.Draw({ source: mysource, ...
1
vote
1answer
360 views

Selection with circle using JSTS

Anybody know if there is a possibility of using JSTS library with OL3, to create a circle for selecting marker in a map. Actually i succeed creating a polygon which can select markers and return the ...
1
vote
2answers
2k views

How to remove points on the Openlayers map?

I am experimenting with openlayers. I am adding points to the map using this example. However, I also want to delete unwanted points from the map. For example, I clicked 6 points on the map and I want ...
0
votes
1answer
731 views

openlayers interaction only on left mouse

Using openlayers (latest - 4), I have a drawing interaction that draws a circle - let drawCircle = new ol.interaction.Draw({source: source, type: "Circle"}); map.addInteraction(drawCircle); Both ...
0
votes
1answer
506 views

Openlayers VectorTiles Draw Interaction

I am trying to add a the draw interaction to my openlayers 4.1.0 VectorTile layer. I have been able to add the draw interaction to a Vector layer, but not a VectorTile layer. Below is my js code: ...
0
votes
1answer
381 views

finishCondition based on feature being drawn

I have a draw interaction in Openlayers 4. I'm using it to draw polygons. I would like to continue drawing the polygon if its area is less than a default value. I tried using the property ...