The doc example on WebMapServiceImageryProvider tells you to pass the proxy as an option:
var provider = new Cesium.WebMapServiceImageryProvider({
url : 'https://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer',
layers : '0',
proxy: new Cesium.DefaultProxy('/proxy/')
});
viewer.imageryLayers.addImageryProvider(provider);
But proxy
is not an option on this class! The right way to pass this proxy would be:
var provider = new Cesium.WebMapServiceImageryProvider({
url : new Cesium.Resource({
url : ''https://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer",
proxy: new Cesium.DefaultProxy('/proxy/')
}),
layers : '0'
});
viewer.imageryLayers.addImageryProvider(provider);