[OpenLayers-Users] Why overviewmap cannot display with opacity layer in Firefox?

Christopher Schmidt crschmidt at metacarta.com
Sat Oct 13 12:46:00 EDT 2007


On Sat, Oct 13, 2007 at 10:28:03AM -0600, Gregor Mosheh wrote:
> Yang Zhaohui wrote:
> >"OpenLayers.Rico.Corner.changeOpacity(this.mapDiv, 0.75);"
> >can only run correctly in IE, 
> 
> Correct. Opacity is not supported by Firefox, only by IE. I don't think 
> that opacity is a W3C standard behavior, so I wouldn't hold my breath 
> waiting for it to be "fixed" any time soon.

Actually, looking at the code, it seems that the changeOpacity function
*is* setting both the IE and W3C standard opacity. 

"""
        var mozillaOpacity = newOpacity;        
        var ieOpacity = 'alpha(opacity=' + newOpacity * 100 + ')';

        theDiv.style.opacity = mozillaOpacity;
        theDiv.style.filter = ieOpacity;
...
            spanElements[currIdx].style.opacity = mozillaOpacity;
            spanElements[currIdx].style.filter = ieOpacity;
"""

However, these functions are not OpenLayers specific -- they're directly
from http://openrico.org/ , so looking there for information or newer
versions would probably be a good idea. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list