Last active
August 29, 2015 14:25
-
-
Save ThomasG77/b4a5703e2751da61952b 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> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Románské kostely v Česku</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.7.0/ol.css" type="text/css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.7.0/ol.js"></script> | |
</head> | |
<body> | |
<div id="mapdiv"></div> | |
<script> | |
var vectorLayer = new ol.layer.Vector({ | |
title: "Románské kostely", | |
source: new ol.source.Vector({ | |
format: new ol.format.GeoJSON(), | |
url: 'kostely.geojson' | |
}), | |
style: new ol.style.Style({ | |
image: new ol.style.Icon({ | |
src: "Ol_icon_blue.png" | |
}) | |
}) | |
}); | |
var map = new ol.Map({ | |
target: "mapdiv", | |
projection: "EPSG:4326", | |
controls: [ | |
new ol.control.OverviewMap() | |
], | |
loadTilesWhileAnimating: true, | |
loadTilesWhileInteracting: true, | |
layers: [ | |
new ol.layer.Tile({ | |
title: "OSM Map", | |
source: new ol.source.OSM() | |
}), | |
// to be filled in later | |
vectorLayer | |
], | |
view: new ol.View({ | |
//Village Čihošť is the geographical center of Czechia | |
center: ol.proj.fromLonLat([15.338611, 49.743889]), | |
zoom: 8 | |
}) | |
}); | |
</script> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment