0
votes

I'm using OpenLayers v6.3.1 to render a WMTS layers of Austria's countries ('Burgenland' in the east and 'Tirol' in the west). Here is a code sandbox I created to show the code and the options used: https://codesandbox.io/s/wmts-openlayers-bgld-x7lcy

The problem is that the tiles are rendered way too much south/east (Turkey/Izmir) instead of Austria/Burgenland and Macedonia/Greek instead of Austria/Tirol:

enter image description here

I'm sure both the data of the layer and the proj4 definitions are correct because it get's rendered in QGIS correctly:

Macedonia/

Why does this happen?

Edit

As @Mike pointed out QGIS seems to detect the inconsistency and apply a workaround for it.

enter image description here

1

1 Answers

0
votes

In the capabilities document the coordinates are in north-east order even though the projections are all east-north (if I define it as north-east the layers appear in a different wrong place with the text facing sideways). Go get around that I defined the projections as north-east and copies of the projections as east-north then changed the projection in the options after parsing. There is also a bug in OpenLayers which is fixed in the latest development version so you will need to use that until thee is another official release. https://codesandbox.io/s/wmts-openlayers-bgld-qmxhu

For comparison here a real north-east projection where no workaround is needed https://codesandbox.io/s/wmts-axis-neu-d2vux