WMS and Geoserver results in a white screen with Cesium

I’m hosting my Cesium and Geoserver installs on the same machine:
My url for my WMS instance is: http://localhost:8080/geoserver/it.geosolutions/wms?service=WMS&version=1.1.0&request=GetMap&layers=it.geosolutions:geotiff_coverage&styles=&bbox=-180.01041653225002,-60.01041666665,-29.989583438950007,60.01041647465&width=768&height=614&srs=EPSG:4326&format=text%2Fhtml%3B%20subtype%3Dopenlayers

And the code I’m using in Cesium is:

var viewer = new Cesium.Viewer(‘cesiumContainer’, {

baseLayerPicker : false

geocoder : false

});

var myLayer=new Cesium.WebMapServiceImageryProvider({

url: ‘http://localhost:8080/geoserver/it.geosolutions/wms’,

parameters : {

transparent : ‘true’,

tiled : ‘false’,

format : ‘image/png’,

maximumLevel : 0,

enablePickFeatures : false

},

layers:‘it.geosolutions:geotiff_coverage’

});

And the result is Cesium producing a white screen. What did I miss?

Thank you,

Darryl

Hi Darryl,

I don’t see anything immeditately wrong. Does the console give any helpful error messages?

Best,

  • Rachel

Turns out that I’d called the layer in the wrong place,

var
viewer = new Cesium.Viewer(‘cesiumContainer’, {

imageryProvider : new
Cesium.WebMapServiceImageryProvider({

url :
http://localhost:8080/geoserver/it.geosolutions/wms’,

layers:‘it.geosolutions:SRTM_W_250m’

}),

baseLayerPicker : false

});

Thank you!

Darryl