[OpenLayers-Users] changing sld files for WMS layer
vrbikdan
vrbikdan at gmail.com
Fri Apr 20 07:36:18 EDT 2012
Hi,
I know, that it was here before, but I didn't find solution. I'm fighting
few days with changing sld files. I'm using geoserver where are all my
layers and it have default sld. Now, I want to change their style so I
thought, that I can use
layers['layerB'].mergeNewParams({sld:'http://192.168.1.92/avon/sld/newStyle.sld'});.
But something is wrong, because after it is nothing happend, only redraw
layer but stay with old default style :( I tried to define sld in params of
layer as below and the same end, layer was with default style from
geoserver.
vrstvaB: new OpenLayers.Layer.WMS(
"vrstva_2", "http://192.168.1.92:8080/geoserver/zk/wms",
{ layers: 'zk:vrstvaB',
srs: 'EPSG:4326',
env: "opacita:"+opa+"; sel:9999",
format: 'image/png',
INFO_FORMAT: 'application/vnd.ogc.gml',
tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom,
transparent: 'true',
sld:'http://192.168.1.92/avon/sld/populaceB.sld'},
{singleTile: false,
yx : {'EPSG:4326' : false}}),
Do you have any ideas, where could be a problem and how to solve it?
Thanks a lot
Dan
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/changing-sld-files-for-WMS-layer-tp4901653p4901653.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list