WMS / ArcGIS Server

179 views
Skip to first unread message

tob...@gmail.com

unread,
Apr 9, 2015, 11:18:25 AM4/9/15
to cesiu...@googlegroups.com
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
https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Imagery%20Layers%20Manipulation.html&label=Showcases


Thanks!

mic.an...@gmail.com

unread,
Apr 9, 2015, 1:10:41 PM4/9/15
to cesiu...@googlegroups.com, tob...@gmail.com
The WebMapServiceImageryProvider works with the following code snippet:

addAdditionalLayerOption(
'Zurich WMS',
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?
https://cesiumjs.org/2013/01/04/Cesium-Imagery-Layers-Tutorial/

Michele

Tobias Brunner

unread,
Apr 9, 2015, 3:50:26 PM4/9/15
to mic.an...@gmail.com, cesiu...@googlegroups.com
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


mic.an...@gmail.com

unread,
Apr 10, 2015, 3:11:40 AM4/10/15
to cesiu...@googlegroups.com, mic.an...@gmail.com, tob...@gmail.com
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

Tobias Brunner

unread,
Apr 10, 2015, 4:34:08 AM4/10/15
to Michele Andreolli, cesiu...@googlegroups.com
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!

mic.an...@gmail.com

unread,
Apr 10, 2015, 5:10:35 AM4/10/15
to cesiu...@googlegroups.com, mic.an...@gmail.com, tob...@gmail.com
I'm not expert with AGS, but maybe this could help...

https://developers.arcgis.com/javascript/jssamples/exp_cors_buffer.html
Reply all
Reply to author
Forward
0 new messages