Dedek
Dedek

Reputation: 1

OpenLayers 3, Why the WMS layer does not appear?

I would like for a "Vumop" layer to appear in http://www.4dprostor.cz/nesvacily-vumop.html

I tried with the following code (OL9 v3.9.0):

var Vumop = new ol.layer.Tile({
source: new ol.source.TileWMS({
url: 'http://geoportal.vumop.cz/wms_vumop/zchbpej.asp',
params: {'LAYERS': 'tro',
'TILED': true}
})
});

The URL is correct, the name of the layer is correct, the CRS is correct. Everything works correctly in QGIS. Anybody know what's wrong?

Upvotes: 0

Views: 1433

Answers (1)

Alvin Lindstam
Alvin Lindstam

Reputation: 3142

The response given when OpenLayers tries to load the tiles is a WMS error, containing:

msWMSLoadGetMapParams(): WMS server error. Invalid CRS given : CRS must be valid for all requested layers. msProcessProjection(): Projection library error. no options found in 'init' file

Changing the CRS from EPSG:3857 to EPSG:4326 returns a tile. Does the WMS server not support EPSG:3857?

Upvotes: 0

Related Questions