Hi,
I'm currently implementing "highlighting" functionality in my application
using a wms overlay (similar to the ideas presented here:
http://trac.openlayers.org/wiki/Highlighting), and I've got it to work using
both client side sld (SLD_BODY) and remote/server-side SLD. And also using
POST for a getMap request with sld xml.
But because of some "Request URI too long" issues when applying filter on
FeatureIds, I've been trying to make use of the WMS.Post layer
implementation.
In my sld I have defined a highlighting style, which basically is a
semi-transparent (50%) yellow version of the feature that is put on top so
that you still can see the original feature below. This is for example my
polygon highlight definition:
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#e7cf00</CssParameter><CssParameter
name="fill-opacity">0.5</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#c9b400</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
<CssParameter name="stroke-opacity">0.5</CssParameter>
</Stroke>
</PolygonSymbolizer>
What is strange though, is that it seems that IE doesn't respect the
fill-opacity parameters. The tile I get back when using WMS.Post overlays
properly, but the feature itself does not have an opacity of 0.5, it's not
transparent. If I switch back to standard WMS layer, it works immediately.
Here two images that shows the difference between IE and FF.
In Firefox:
http://osgeo-org.1803224.n2.nabble.com/file/n5530378/ff_opacity-works.png
And in Internet Explorer:
http://osgeo-org.1803224.n2.nabble.com/file/n5530378/ie_opacity-fails.png
Does anyone have a clue to why this is?
My javascript code that creates the layer is like this:
higlightLayer = new OpenLayers.Layer.WMS.Post(wmsId,
highlightUrl, {
layers : layerName,
'includeFids': includeFidsArray,
format : 'image/png',
transparent : true
}, {
singleTile : true,
unsupportedBrowsers:
notSupportedBrowsers
});
higlightLayer.setIsBaseLayer(false);
higlightLayer.setVisibility(true);
Any help would be greatly appreciated,
Regards
Eivind
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Combination-of-Layer-WMS-Post-and-IE-7-8-seems-to-have-problems-with-fill-opacity-defined-in-sld-tp5530378p5530378.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users