-
-
Save ThomasG77/5e47a21c651be974cb688e8a8f967cca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Vector Style Examples</title> | |
<link rel="stylesheet" href="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.1.3/css/ol.css"> | |
<script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.1.3/build/ol.js"></script> | |
</head> | |
<body> | |
<div id="map" class="map"></div> | |
<script> | |
var map = new ol.Map({ | |
view: new ol.View({center: ol.proj.transform([16.9278, 52.4044], 'EPSG:4326', 'EPSG:3857'), zoom: 11}), | |
layers: [new ol.layer.Tile({ | |
source: new ol.source.OSM() | |
})], | |
target:'map' | |
}); | |
var marker = new ol.Feature({ | |
geometry: new ol.geom.Point(ol.proj.transform([16.9071388, 52.4901917], 'EPSG:4326', 'EPSG:3857')), | |
}); | |
var markers = new ol.source.Vector({ | |
features: [marker] | |
}); | |
var markerVectorLayer = new ol.layer.Vector({ | |
source: markers, | |
}); | |
map.addLayer(markerVectorLayer); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment