Questions tagged [ol-interaction]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
32 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
0answers
45 views

How to differentiate between features and labels for select interaction and applying styles in OpenLayers?

I am using a style function to style a vector layer with text labels. For the text style I have set overflow to true so that labels can exceed the dimensions of a polygon. I now want to use another ...
1
vote
0answers
70 views

Difference between an interaction and eventListener in OpenLayers

I am wondering when should I use an interaction instead of an eventListener. For example I can have a handler function like this: function handler(evt) { if (evt.type === 'click') { console....
0
votes
1answer
979 views

Drawing shapes and features in OpenLayers 4

Using OpenLayers 4, I want to make a map giving the ability to draw shapes AND features. For this I want to combine the draw shapes example with the draw features example, both given on the website of ...
1
vote
1answer
574 views

OpenLayers interaction is not working when initializing in map object

There is a problem to set interaction for the map object in OpenLayers. I've used this code but it's not working: var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() }); var ...
1
vote
2answers
2k views

How can I use shift or ctrl key without openlayers 3?

I want to verify if Shift or Ctrl key is pressed to make my own multiselection. I use a digitizer to draw polygon, rectangle, etc... to make selection from geometry on server-side (with mapguide api)....
6
votes
3answers
9k views

How unselect a feature ithat select with OpenLayers-3.8.2's selectInteraction?

I'm using OpenLayers-3.8.2. I want to select a feature and then delete it. my code is as follow: deleteFeature = function(event){ var feature = event.selected[0]; myLayer.getSource()....