Answer the question
In order to leave comments, you need to log in
How to hide the line that we are currently drawing in openlayers?
There is an initial line drawing addition
var vectorSource = new ol.source.Vector();
var vectorLayer = new ol.layer.Vector({ source: vectorSource });
var drawLine = new ol.interaction.Draw({
source: vectorSource,
type: 'LineString'
});
map.addLayer(vectorLayer);
$(".elem").hover(function(){
//скрыть линию
},
function(){
//вернуть линию к мышке
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question