openlayers / ol-cesium

OpenLayers - Cesium integration
http://openlayers.org/ol-cesium/
BSD 2-Clause "Simplified" License
968 stars 321 forks source link

Weird behavior when showing WMS layers in 2.20 #1204

Open mattiatibu opened 3 weeks ago

mattiatibu commented 3 weeks ago

Hi, I’m using ol-cesium to add some layers to a map but in the 3d view the WMS layers don’t appear. I’m using Angular 17 and ol-cesium 2.20

The map projection is the default epsg:3857 and the layers are in epsg:4326, so they are reprojected by openlayers, it worked very well while using ol-cesium 2.19.3 but the layers don’t appear correctly or don’t appear at all after updating ol-cesium because the library tries to obtain tiles with the wrong bounding box from geoserver. It happens with WMS layers with the geoserver default style, a custom style configured in geoserver or just raster tilesets.

mattiatibu commented 3 weeks ago

I've found a workaround , by changing the projection of my layer to EPSG:3857 in the openlayers layer configuration, the layer appears correctly and the bounding box requested is right but I still need layers in EPSG:4326 for my project, is there a better solution to solve this issue?

gberaudo commented 2 weeks ago

Hi @mattiatibu , there were some changes lately in the way WMS are loaded. In the past we only supported converting WMS using default load functions. See https://github.com/openlayers/ol-cesium/pull/1190 It is possible to specify the load function you want used in 3D. You may want to experiment with it.