DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Titletitle>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL">script>
<link href="ol/ol.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="ol/ol.js" charset="utf-8">script>
head>
<body>
<div id="map" style="width: 100%;height: 100%">div>
<script>
var layerVector = new ol.layer.Vector({
source: new ol.source.Vector()
});
var map = new ol.Map({
layers:[
new ol.layer.Tile({
source:new ol.source.OSM(),
})
,layerVector
],
target:'map',
view:new ol.View({
center: [12950000, 4860000],
zoom:7
})
});
var iconStyle = new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#666666',
width: 4
})
});
var pointFeature2 = new ol.Feature({
geometry: new ol.geom.LineString([[12950000, 4860000],[12950000, 4760000],[12850000, 4760000]])
});
pointFeature2.setStyle(iconStyle);
layerVector.getSource().addFeature(pointFeature2);
script>
body>
html>