Problem with WebMapServiceImageryProvider

I have to add the weather data layer. I try to connect to openweathermap service(description is here: http://openweathermap.org/hugemaps#wms).

  var viewer = new Cesium.Viewer('cesiumContainer', {
  baseLayerPicker: false,
  homeButton: false,
  infoBox: false,
  imageryProviderViewModels: false
  });

  var imageryLayers = viewer.imageryLayers;
  imageryLayers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
    url: ‘http://wms.openweathermap.org/service’,
    layers: ‘pressure’,
    parameters: {
      transparent: false,
      format: ‘image/jpeg’,
      APPID: ‘here my code’
    }
  }));

This code does not work. Tiles are not drawn, but loaded. In console I have the next errors: An error occurred in "N": Failed to obtain image tile X: 0 Y: 0 Level: 0. etc.

What could be the problem?

If you look in the browser console, you’ll see it’s complaining that openweathermap.org does not support CORS (cross-origin resource sharing). This means you need to use a proxy. The Cesium dev server ships with one, which I’ve added to your code below. In a production application, you would configure your server to have it’s own proxy.

    imageryLayers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
            url: '[http://wms.openweathermap.org/service](http://wms.openweathermap.org/service)',

proxy: new Cesium.DefaultProxy(’/proxy/’),
layers: ‘pressure’,
parameters: {
transparent: false,
format: ‘image/jpeg’,
APPID: ‘here my code’
}
}));

There’s more information on proxying in our imagery tutorial: http://cesiumjs.org/2013/01/04/Cesium-Imagery-Layers-Tutorial/