Skip to content

Commit

Permalink
init radon
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaGeo committed Sep 28, 2023
1 parent 5fefcc9 commit 651d7aa
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions radon/radon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<html>
<head>
<title>PMTiles Radon Vector Example</title>
<meta charset="utf-8"/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ol.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/ol.css">
<script src="https://unpkg.com/[email protected]/dist/olpmtiles.js"></script>
<style>
body, #map {
height:100vh;
margin: 0;
}
</style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
const vectorLayer = new ol.layer.VectorTile({
declutter: true,
source: new olpmtiles.PMTilesVectorSource({
url: "radon.pmtiles",
attributions: ["© Land Information New Zealand"]
}),
style: new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'gray',
width: 1,
}),
fill: new ol.style.Fill({
color: 'rgba(20,20,20,0.9)',
})
})
});

ol.proj.useGeographic();
const map = new ol.Map({
layers: [vectorLayer],
target: 'map',
view: new ol.View({
center: [1.4,53.1],
zoom: 7
}),
});
</script>
</body>
</html>
Binary file added radon/radon.pmtiles
Binary file not shown.

0 comments on commit 651d7aa

Please sign in to comment.