I've following code:
var source = new ol.source.Vector();var vector = new ol.layer.Vector({ source: source style: new ol.style.Style({ stroke: new ol.style.Stroke({ color: "#ffcc33", width: 2 }) })});map.addLayer(vector);var drawInteraction = new ol.interaction.Draw({ source: source, type: "LineString"});map.addInteraction(drawInteraction);How I can draw only 2 points start and end?
أكثر...
var source = new ol.source.Vector();var vector = new ol.layer.Vector({ source: source style: new ol.style.Style({ stroke: new ol.style.Stroke({ color: "#ffcc33", width: 2 }) })});map.addLayer(vector);var drawInteraction = new ol.interaction.Draw({ source: source, type: "LineString"});map.addInteraction(drawInteraction);How I can draw only 2 points start and end?
أكثر...