Description
I have to use a WMTS-Service in EPSG:31254 and show it on an OpenLayers 5 Map in EPSG:3857. The WMTS-Service to use is this one.
My Solution
I use proj4 and configure "EPSG:31254" according to epsg.io/31254
proj4.defs("EPSG:31254", "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
Then i configure OpenLayers to use proj4 and create an OpenLayers Map in EPSG:3857 (i know, its the default projection) with a default background at a given center and zoom level.
Then i add the TileLayer in EPSG:31254:
- read WMTS Capabilities
- build Options from Capabilities
- build WMTS-Source with Options
- add TileLayer with WMTS-Source
Problem
An Image is shown, but it's shown at the wrong place (e.g. the Italian Peninsula should overlap!)
Source Code
I created an example showing the problem over at codesandbox.io
What is wrong with my solution?