I am loading a layer from Geoserver to OpenLayers using this code :
overlays = new ol.layer.Group({
'title': 'Couches',
layers: [
new ol.layer.Image({
title: 'refer_22',
source: new ol.source.ImageWMS({
url: 'http://localhost:8080/geoserver/wms',
params: {'LAYERS': 'topp:refer_22'},
ratio: 1,
serverType: 'geoserver'})
})
]
});
map.addLayer(overlays);
In Geoserver, I created a sld style "style.sld" and assigned it to the layer
Now, let s suppose I have 5 styles : "style_1.sld", ..., "style_5.sld"
Is there a way to add a line where I can specify whish style I want my layer to be displayed with.