WMS / ArcGIS Server

When I try to access our ArcGIS Server through the "ArcGISMapServerImageryProvider", I get the following error:

An error occurred in "ArcGisMapServerImageryProvider": An error occurred while accessing //www.gis.stadt-zuerich.ch/maps/services/wms/WMS-ZH-STZH-OGD/MapServer.

If I try the WMS interface using this config:
    addAdditionalLayerOption(
            ‘United States GOES Infrared’,
            new Cesium.WebMapServiceImageryProvider({
                url : ‘http://www.gis.stadt-zuerich.ch/maps/services/wms/WMS-ZH-STZH-OGD/MapServer/WMSServer?’,
                layers : ‘1’,
                proxy : new Cesium.DefaultProxy(’/proxy/’)
            }));

I Get
An error occurred in "WebMapServiceImageryProvider": Failed to obtain image tile X: 1 Y: 0 Level: 1.

I can sucessfully get a WMS tile in the browser by typing in the following URL:
http://www.gis.stadt-zuerich.ch/maps/services/wms/WMS-ZH-STZH-OGD/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:4326&Styles=&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=FALSE&bbox=47.315492730374444,8.443821782566665,47.43963707749998,8.631776103472221&WIDTH=800&HEIGHT=800&Layers=Stadtplan

what am I doing wrong? Im using the sandbox

Thanks!

The WebMapServiceImageryProvider works with the following code snippet:

addAdditionalLayerOption(
            ‘Zurich WMS’,
            new Cesium.WebMapServiceImageryProvider({
                url : 'http://www.gis.stadt-zuerich.ch/maps/services/wms/WMS-ZH-STZH-OGD/MapServer/WMSServer?’,
                layers : ‘Stadtplan’,
                parameters: {
        transparent: ‘true’,
        format: ‘image/png’,
        crs: ‘EPSG:4326’
      }
            }));

For what concerns the ARCGIS service, are you sure to use the ARCGIS REST API?

Michele

thanks for the snippet!

unfortunately, I still get

An error occurred in “WebMapServiceImageryProvider”: Failed to obtain image tile X: 0 Y: 0 Level: 0.

when I insert your snippet into the layers-manipulation example…

as for the AGS: yes, it’s the rest API

If I set the proxy I get some errors and I don't visualize the map, but if I enable the Allow-Control-Allow-Origin: * extension in the browser... it works well...no error logs

Thanks! This solved it for me - do I have to change anything on the AGS-Webserverside (CORS), so that the chrome extension is not needed anymore?

Thanks again!

I'm not expert with AGS, but maybe this could help...

https://developers.arcgis.com/javascript/jssamples/exp_cors_buffer.html