[OpenLayers-Users] OpenLayers polygon fill on IE has black shading after setting opacity

Andreas Hocevar ahocevar at opengeo.org
Thu Jan 12 05:12:42 EST 2012


Hi,

this is a bug in IE, and there doesn't seem to be a known workaround:
http://social.msdn.microsoft.com/Forums/en/iewebdevelopment/thread/c2cc8d05-cffd-4454-900f-785e5ce78919

Andreas.

On Wed, Jan 11, 2012 at 8:42 PM, Vadim Bokin <vbokin at gmail.com> wrote:
> I apologize up front, but this is a cross-post from gis.stackexchange.  I
> asked the question there, w/o much response, so I think this may be an OL
> bug rather than a "how do I use it" question.  I'm going to duplicate the
> post here and also available at
> http://gis.stackexchange.com/questions/18677/openlayers-polygon-fill-on-ie-has-black-shading
>
> ----
>
> I have an odd problem on with OpenLayers on IE6, IE7 and IE8.  A newly drawn
> polygon has odd black shading.  In fact, even the line (stroke) has the same
> black outline.
>
> Works great in Firefox, Chrome, Safari and even IE9.
>
> I've tried everything from creating my own stylemap and symbolizers, to
> removing all styles and using default layer, and it still has a problem.
>
> And to add to the puzzle, if you draw a second feature and intersect with
> the first, the intersected area has *perfect* colorization/rendering.
>
> I've tried changing the basic style to have a different color (say blue) but
> then the color is again the base blue plus the black shading/fill attached
> to it.
>
> http://osgeo-org.1803224.n2.nabble.com/file/n7177631/Uk1KH.png
>
> Have run the basic drawing example,
> http://www.openlayers.org/dev/examples/draw-feature.html and it works just
> fine on all browsers.
>
> http://osgeo-org.1803224.n2.nabble.com/file/n7177631/w5HLA.png
>
> ---
>
> Edit 1/10 5p PST
>
> I was finally able to create a stripped-down sample that reproduce the
> error.
>
> I wrote a page that accepts a URL param to enable the bug, and it'll be
> broken in IE8,7,and 6.  All you have to do is draw a polygon, and you'll see
> that it comes out black
>
> http://dl.dropbox.com/u/47684/nc4/debug/RenderTest.html?break=1
>
> And here's the source:
>
>
>
> As you can see, just setting the layer OPACITY will break it. And this
> actually breaks on IE6 and 7. It works on 8, but I have compatibility mode
> set to 7, so yes that makes it break on 8.
>
> Why setting opacity is breaking?  I've traced the code down to `Util.js` and
> the `modifyDOMElement` function, and it *looks* to be ok.  But... ?
>
> Thank you.
>
> -Vadim
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenLayers-polygon-fill-on-IE-has-black-shading-after-setting-opacity-tp7177631p7177631.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Users mailing list