Kan iemand mij helpen bij het ophalen van de lucht foto WMTS tile in Openlayers?
Hieronder mijn code:
ngAfterViewInit(): void {
this.projection = getProjection('EPSG:3857');
this.projectionExtent = this.projection.getExtent();
this.size = getWidth(this.projectionExtent) / 256;
for (let z = 0; z < 14; ++z) {
this.resolutions[z] = this.size / Math.pow(2, z);
this.matrixIds[z] = z;
}
this.initMap();
}
private initMap(): void{
this.Map = new Map({
target: 'map',
layers: [
new Tile({
source: new OSM(
)
}),
new Tile({
visible: true,
className : 'Luchtfoto',
source: new WMTS({
attributions: '',
crossOrigin: null,
url: 'https://service.pdok.nl/hwh/luchtfotocir/wmts/v1_0?&request=GetCapabilities&service=wmts',
layer: 'luchtfoto',
matrixSet: 'EPSG:3857',
format: 'image/png',
tileGrid: new WMTSTileGrid({
origin: getTopLeft(this.projectionExtent),
resolutions: this.resolutions,
matrixIds: this.matrixIds,
}),
style: 'default',
wrapX: true,
}),
}),
],
view: new View({
center: [510406.33, 6790500.21],
zoom: 9
})
});
}