1. A concise explanation of the problem you are experiencing.
Hi I have a question, when I load a shapefile from my geoserver that is in localhost send me the error:
Access to XMLHttpRequest at 'http: // localhost: 8085 / geoserver / sic / wms? Transparent = true & format = image% 2Fpng & service = WMS & version = 1.1.0 & request = GetMap & layers = sic% 3Ahidro & bbox = -115.04149627685547% 2C15.439924240112305% 2C-90.65814208984375% 2C32.72083282470703 & width = 768 & height = 544 & srs = EPSG% 3A4326 & styles = ‘from origin’ http: // localhost: 10081 ‘has been blocked by CORS policy: No’ Access-Control-Allow-Origin 'header is present on the requested resource.
2. An example of a minimum code. If you have found an error, this helps us to reproduce and repair it.
The part of the code is the following:
function setupLayers () {
addAdditionalLayerOption (
’test’,
new Cesium.WebMapServiceImageryProvider ({
url: ‘http: // localhost: 8085 / geoserver / sic / wms? service = WMS & version = 1.1.0 & request = GetMap & layers = sic% 3Ahidro & bbox = -115.04149627685547% 2C15.439924240112305% 2C-90.65814208984375% 2C32.72083282470703 & width = 768 & height = 544 & srs = EPSG% 3A4326 & format = application / openlayers’,
layers: ‘hydro’,
parameters: {
transparent: ‘true’,
format: 'image / png’
}
}));
}
3. Context. Why do you need to do this? We could know a better way to achieve your goal.
It’s a personal project where I want to see some layers of Mexico
4. The version of Cesium you are using, your operating system and browser.
I am using Cesium 1.56.1
Windows 10 and Chrome