Use DOM instead of map canvas for ol.render.Box

This commit is contained in:
Andreas Hocevar
2015-10-15 16:52:31 +02:00
parent afdd22bd1d
commit 7a070dd859
10 changed files with 218 additions and 151 deletions

View File

@@ -8,9 +8,6 @@ goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.source.OSM');
goog.require('ol.source.Vector');
goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');
var vectorSource = new ol.source.Vector({
@@ -44,15 +41,7 @@ var selectedFeatures = select.getFeatures();
// a DragBox interaction used to select features by drawing boxes
var dragBox = new ol.interaction.DragBox({
condition: ol.events.condition.platformModifierKeyOnly,
style: new ol.style.Style({
fill: new ol.style.Fill({
color: [255, 255, 255, 0.4]
}),
stroke: new ol.style.Stroke({
color: [100, 150, 0, 1]
})
})
condition: ol.events.condition.platformModifierKeyOnly
});
map.addInteraction(dragBox);