WebMapServiceImageryProvider not showing tiles

Hello,

I downloaded the latest Cesium 2 days ago.

Using Chrome's element inspection tool (Network tab) I can see the tiles coming back from our geoserver, but the tiles are not displayed on the globe. Tried every which way to change settings, saying layers.raise(myLayer), myLayer.show(true). Nothing. The request to WMS looks good. SRS is 4326, everything looks normal from the network side.

I'd appreciate any insights. Here's my code:

var cesiumWidget = new Cesium.CesiumWidget(‘cesiumContainer’);
  
var layers = cesiumWidget.centralBody.getImageryLayers();
  
var mountainLayer = layers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
    url: ‘http://foo:8080/geoserver/gwc/service/wms’,
    layers : ‘mountain_areas’,
    parameters : {
            format : ‘image/png’
        }
        
}));

The most common problem with loading imagery is a problem with cross-origin request headers, or CORS. Check your requests for the Access-Control-Allow-Origin header, if it’s not present, you can install CORS Filter in Geoserver.

Hi Scott,

Thanks for your reply. The problem us not cross-origin. I can see the WMS images coming back in Chrome's debug window for Network traffic (see original post).
Thanks

Hi,

Unfortunately, seeing the requests and images coming back in Chrome’s network tab doesn’t prove there’s no CORS problem, because a CORS failure results in the browser rejecting a request/response that was otherwise successful. Unless the HTML page you’re viewing is hosted on the same machine (and port!) as the GeoServer, or you’ve taken steps to ensure GeoServer is including CORS headers, then CORS is the most likely culprit.

If you’re sure that’s not the problem, my next step would be to turn on “stop on all exceptions” in the Chrome debugger and see if you’re getting an exception somewhere. Your code looks correct to me, so it’s hard to imagine what (other than CORS failure) could be the problem.

Kevin

I see. I was thrown-off track by how Openlayers worked on this WMS, but not cesium. I will try a proxy servlet on my server (probably mush like your /proxy/ in the examples.

Thanks !

hi,
Have you solved this problem?

I got the same problem.please goto my post ‘https://groups.google.com/forum/#!topic/cesium-dev/QQ1iIhpkoBY’ .

thank you.