Is it possible to create a linestring with points on the cordinates mentioned, as well as name of that linestring.
for (var i = 0; i < wp.length; i++) {
wp[i] = ol.proj.transform(wp[i], 'EPSG:4326', 'EPSG:3857');
//console.log(wp);
}
var wpfeatureLine = new ol.Feature({
geometry: new ol.geom.LineString(wp)
});
var wpline = new ol.source.Vector({
});
wpline.addFeature(wpfeatureLine); //lined or a waypoint feature on map
//wpline.addFeature(CircleFeature);
var vectorLineLayer = new ol.layer.Vector({
source: wpline,
style: new ol.style.Style({
fill: new ol.style.Fill({ color: '#000000', weight: 4 }),
stroke: new ol.style.Stroke({ color: '#000000', width: 2 })
})
});
map.addLayer(vectorLineLayer);