2
votes
Accepted
OpenLayers interaction is not working when initializing in map object
You cannot simply pass an array with interactions, but you have to use ol.interaction.defaults().extend, like this:
var interaction = new ol.interaction.DragRotateAndZoom();
var map = new ol.Map({
...
2
votes
How unselect a feature ithat select with OpenLayers-3.8.2's selectInteraction?
In open layers 5.2, you can unselect a feature like this:
deleteFeature = function (event) {
var feature = event.selected[0];
myLayer.getSource().removeFeature(feature);
selectInteraction....
1
vote
Accepted
Drawing shapes and features in OpenLayers 4
You made a mistake on the condition.
if(value !== 'None' || value !== 'Square' || value !=='Box'){
should be
if(value !== 'None' && value !== 'Square' && value !=='Box'){
with your ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
openlayers × 11ol-interaction × 11
event-listener × 3
map-drawing × 2
javascript × 1
style × 1
mapguide × 1
context-menu × 1
draw-interaction × 1