Skip to content

Commit

Permalink
fix raster
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaGeo committed Oct 9, 2023
1 parent 3dd4a4d commit fd68161
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions radon/radon-ol-raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,24 @@
source: new ol.source.OSM()
});

// Create a raster layer using the PMTiles format
const rasterLayer = new ol.layer.Tile({
source: new ol.source.TileImage({
url: "radon_raster_v2.pmtiles", // Replace with the path to your raster PMTiles file
attributions: ["© British Geological Survey"]
})
});
const rasterLayer = new ol.layer.WebGLTile({
source: new olpmtiles.PMTilesRasterSource({
url:"radon_raster_v2.pmtiles",
attributions:["© British Geological Survey"],
tileSize: [512,512]
})
});

ol.proj.useGeographic();

ol.proj.useGeographic();
const map = new ol.Map({
layers: [osmLayer, rasterLayer],
target: 'map',
view: new ol.View({
const map = new ol.Map({
layers: [osmLayer, rasterLayer],
target: 'map',
view: new ol.View({
center: [-1, 56],
zoom: 6
}),
zoom: 3,
multiWorld: true
})
});
</script>
</body>
Expand Down

0 comments on commit fd68161

Please sign in to comment.