Here is a part of code,
draw = new ol.interaction.DragBox({
/* dragbox interaction is active only if alt key is pressed */
condition: ol.events.condition.altKeyOnly,
/* style the box */
style: new ol.style.Style({
stroke: new ol.style.Stroke({
color: [0, 0, 255, 1]
})
})
});
/* add the DragBox interaction to the map */
map.addInteraction(draw);
draw.on('boxend', function (evt) {}
I googled but didn't find how will I do. I created a dragbox and added to map , I have some markers on the map. How I learn that dragbox contains markers or not ? Thanks for responses.
No comments:
Post a Comment