Created
January 9, 2021 16:31
-
-
Save iamgeoknight/7795cf822914b83b5eae318af46c9afd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.5.0/css/ol.css" type="text/css"> | |
<style> | |
.map { | |
height: 400px; | |
width: 400px; | |
} | |
</style> | |
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.5.0/build/ol.js"></script> | |
<title>OpenLayers example</title> | |
</head> | |
<body> | |
<h2>My Map</h2> | |
<div id="map" class="map"></div> | |
<script type="text/javascript"> | |
var map = new ol.Map({ | |
target: 'map', | |
layers: [ | |
new ol.layer.Tile({ | |
source: new ol.source.OSM() | |
}) | |
], | |
view: new ol.View({ | |
center: ol.proj.fromLonLat([37.41, 8.82]), | |
zoom: 2 | |
}) | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment