OGC map tile source

This commit is contained in:
Tim Schaub
2020-04-24 17:15:32 -06:00
parent d7af546ad3
commit 791add0d73
5 changed files with 442 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
---
layout: example.html
title: OGC Map Tiles (Geographic)
shortdesc: Rendering map tiles from an OGC API Tiles service.
docs: >
The OGC API Tiles specification describes how a service can provide map tiles.
tags: "ogc"
---
<div id="map" class="map"></div>

View File

@@ -0,0 +1,20 @@
import Map from '../src/ol/Map.js';
import OGCMapTile from '../src/ol/source/OGCMapTile.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new OGCMapTile({
url: 'https://maps.ecere.com/ogcapi/collections/blueMarble/map/tiles/WorldCRS84Quad',
}),
}),
],
view: new View({
projection: 'EPSG:4326',
center: [0, 0],
zoom: 1,
}),
});

View File

@@ -0,0 +1,9 @@
---
layout: example.html
title: OGC Map Tiles
shortdesc: Rendering map tiles from an OGC API Tiles service.
docs: >
The OGC API Tiles specification describes how a service can provide map tiles.
tags: "ogc"
---
<div id="map" class="map"></div>

19
examples/ogc-map-tiles.js Normal file
View File

@@ -0,0 +1,19 @@
import Map from '../src/ol/Map.js';
import OGCMapTile from '../src/ol/source/OGCMapTile.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new OGCMapTile({
url: 'https://maps.ecere.com/ogcapi/collections/blueMarble/map/tiles/WebMercatorQuad',
}),
}),
],
view: new View({
center: [0, 0],
zoom: 1,
}),
});