File tree 5 files changed +891
-1
lines changed 5 files changed +891
-1
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+
4
+ < head >
5
+ < meta charset ="UTF-8 ">
6
+ < title > GeoTIFF with Overviews</ title >
7
+ < link rel ="stylesheet " href ="node_modules/ol/ol.css ">
8
+ < style >
9
+ .map {
10
+ width : 100% ;
11
+ height : 400px ;
12
+ }
13
+ </ style >
14
+ </ head >
15
+
16
+ < body >
17
+ < div id ="map " class ="map "> </ div >
18
+
19
+ < script type ="module " src ="main.js "> </ script >
20
+ </ body >
21
+
22
+ </ html >
Original file line number Diff line number Diff line change
1
+ import GeoTIFF from "ol/source/GeoTIFF.js" ;
2
+ import Map from "ol/Map.js" ;
3
+ import TileLayer from "ol/layer/WebGLTile.js" ;
4
+
5
+ const source = new GeoTIFF ( {
6
+ sources : [
7
+ {
8
+ // url: "https://openlayers.org/data/raster/no-overviews.tif",
9
+ // url: "https://ngimapservicestorage.blob.core.windows.net/geotiff/TNW/TWN-R01_cog.tif",
10
+ url : "https://ngimapservicestorage.blob.core.windows.net/geotiff/TNW/TWN-R01.tif" ,
11
+ // overviews: ["https://openlayers.org/data/raster/no-overviews.tif.ovr"],
12
+ } ,
13
+ ] ,
14
+ } ) ;
15
+
16
+ const map = new Map ( {
17
+ target : "map" ,
18
+ layers : [
19
+ new TileLayer ( {
20
+ source : source ,
21
+ } ) ,
22
+ ] ,
23
+ view : source . getView ( ) ,
24
+ } ) ;
You can’t perform that action at this time.
0 commit comments