how to use wms?

Hi everyone,
I try to loade imagery layer from
I have seen it with openlayers in
I want to use this imagery with cesium and I use this code to load it but I got erros such as “An error occurred in “v”: Failed to obtain image tile X: 1 Y: 0 Level: 1.”

var imagery=new Cesium.WebMapServiceImageryProvider({
url: ‘’,
layers: ‘vaarwegenkaart_nl’,
parameters: {
VERSION: ‘1.1.1’,
REQUEST: ‘GetMap’,
FORMAT: ‘image/png’,
SRS: ‘EPSG:3857’,
BBOX: ‘313086.0678125,6574807.4240625,626172.135625,6887893.491875’,
WIDTH: ‘256’,
HEIGHT: ‘256’


How can I use this service in cesium?


I have also found this wms inside openseamap:

I can’t find how to use it in cesium.

Any help will be welcomed.


Since you’re requesting tiles in the EPSG:3857 spatial reference system, you need to assign the tiling scheme property to:

tilingScheme: new Cesium.WebMercatorTilingScheme()


You also don’t need the Request, BBOX, or Version parameters, they’ll be added dynamically as the viewport changes.

Hi Denver Pierce,
I have changed my code as you told but it didn’t resolve my issue. Still the same error “failed to obtain image”.

however I request manually this map directly in web browser:,-179.603,-7.16055,179.606&width=250&height=250&styles=

Is there something wrong in my url above and why I can’t have image like this below. As an information, this url is obtained by reading according to the getcapability request.

it does not provide the same image that I see in Here is what should this map looks like:

You configuration is probably fine. Your working image link does not have a CORS header, which is the reason Cesium can’t access it. I recommend you check out the Imagery Tutorial, which has a section on dealing with CORS. Ideally you would have them enable CORS on the server, but if that’s not an option, going through a Proxy is the only option.