I am trying to style a WMS layer from geoserver using openlayers. I have written the following code but it doesn't work:
var sld = var sld = 'Attribute-based pointGeoServer SLD Cook Book: Attribute-based point0cluster0#0033CC31cluster1#66000032cluster2#99993D3';wms_layer_larisa = new OpenLayers.Layer.WMS( "Larisa","http://localhost:8080/geoserver/gwc/service/wms", //http://192.168.2.6:8080/geoserver/wms { layers: 'esoteriko:clusternodes_', transparent: true, tiled: true, sld_body: sld }, { //format: "image/png", //STYLES: "pointOikismoi", //visibility: true, displayOutsideMaxExtent: false, projection: new OpenLayers.Projection("EPSG:900913"), } );If I understand correctly when using the sld_body parameter then the default style (defined in geoserver automatically) should be replaced with the style defined in sld variable.What am I missing here?
أكثر...
var sld = var sld = 'Attribute-based pointGeoServer SLD Cook Book: Attribute-based point0cluster0#0033CC31cluster1#66000032cluster2#99993D3';wms_layer_larisa = new OpenLayers.Layer.WMS( "Larisa","http://localhost:8080/geoserver/gwc/service/wms", //http://192.168.2.6:8080/geoserver/wms { layers: 'esoteriko:clusternodes_', transparent: true, tiled: true, sld_body: sld }, { //format: "image/png", //STYLES: "pointOikismoi", //visibility: true, displayOutsideMaxExtent: false, projection: new OpenLayers.Projection("EPSG:900913"), } );If I understand correctly when using the sld_body parameter then the default style (defined in geoserver automatically) should be replaced with the style defined in sld variable.What am I missing here?
أكثر...