Questions tagged [ol-interaction]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
42 views

Kinetic properties in OpenLayers 6

I'd like to know how to adjust properties of ol/Kinetic. And also, what are the default properties when using the default ol/interaction/DragRotateAndZoom ? Properties are decay, minVelocity and ...
0
votes
0answers
47 views

Using async condition callback with the select interaction?

The select interaction allows us to pass in a condition callback that is supposed to return a boolean indicating to Open Layers wether or not a specific event should be considered for the interaction ...
3
votes
0answers
78 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
48 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
86 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
1k 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
940 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
3k 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
10k 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()....