[OpenLayers-Dev] Usage of OpenLayers.Layer.Image: problem with IE in small resolutions

Cédric MOULLET cedric.moullet at gmail.com
Mon Jul 5 09:08:48 EDT 2010


Hi,
I try to use OpenLayers.Layer.Image in order to create an opacity layer (in
order to hide partially the orthophoto, in this case). The layer is defined
with:

var voidLayer = new OpenLayers.Layer.Image("voidLayer",
                'gfx/ol/white.png',
                new OpenLayers.Bounds.fromArray(this.baseConfig.maxExtent),
                new OpenLayers.Size(1, 1), {
            displayInLayerSwitcher: false,
            visibility: false,
            transitionEffect: 'resize',
            resolutions: this.baseConfig.pixelmapResolutions
        });

- white.png is a white 1x1 px image

This works very well in FF and IE for scale higher than 1:100'000:
http://mf-geoadmin0i.bgdi.admin.ch/?zoom=4&X=152100&Y=565025&bgOpacity=80&bgLayer=voidLayer

But, for smaller scale, it doesn't work for IE (but still work for FF):
http://mf-geoadmin0i.bgdi.admin.ch/?zoom=5&X=152100&Y=565025&bgOpacity=80&bgLayer=voidLayer

After investigation, it seems that the image size is huge: "overflow:
hidden; position: absolute; z-index: 1; left: -6562px; top: -9689px; width:
24000px; height: 16000px;" This is normal, but it seems that IE doesn't like
that. Is this limitation already known ? Do you see any workaround (or other
ways to create an opacity layer) ?

Thanks,
Cédric



-- 
Welcome to my world: http://www.cedricmoullet.com/
My Linked In profile: http://www.linkedin.com/in/cedricmoullet
Twitter: http://twitter.com/cedricmoullet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20100705/ae4bea8d/attachment.html


More information about the Dev mailing list