Thanks Tim for these hints !<br>Cédric<br><br><div class="gmail_quote">On Tue, Jul 6, 2010 at 10:27 PM, Tim Schaub <span dir="ltr"><<a href="mailto:tschaub@opengeo.org">tschaub@opengeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On 7/5/10 7:08 AM, Cédric MOULLET wrote:<br>
> Hi,<br>
> I try to use OpenLayers.Layer.Image in order to create an opacity layer<br>
> (in order to hide partially the orthophoto, in this case). The layer is<br>
> defined with:<br>
><br>
> var voidLayer = new OpenLayers.Layer.Image("voidLayer",<br>
> 'gfx/ol/white.png',<br>
> new OpenLayers.Bounds.fromArray(this.baseConfig.maxExtent),<br>
> new OpenLayers.Size(1, 1), {<br>
> displayInLayerSwitcher: false,<br>
> visibility: false,<br>
> transitionEffect: 'resize',<br>
> resolutions: this.baseConfig.pixelmapResolutions<br>
> });<br>
><br>
> - white.png is a white 1x1 px image<br>
><br>
> This works very well in FF and IE for scale higher than 1:100'000:<br>
> <a href="http://mf-geoadmin0i.bgdi.admin.ch/?zoom=4&X=152100&Y=565025&bgOpacity=80&bgLayer=voidLayer" target="_blank">http://mf-geoadmin0i.bgdi.admin.ch/?zoom=4&X=152100&Y=565025&bgOpacity=80&bgLayer=voidLayer</a><br>
> <<a href="http://mf-geoadmin0i.bgdi.admin.ch/?zoom=4&X=152100&Y=565025&bgOpacity=80&bgLayer=voidLayer" target="_blank">http://mf-geoadmin0i.bgdi.admin.ch/?zoom=4&X=152100&Y=565025&bgOpacity=80&bgLayer=voidLayer</a>><br>
><br>
> But, for smaller scale, it doesn't work for IE (but still work for FF):<br>
> <a href="http://mf-geoadmin0i.bgdi.admin.ch/?zoom=5&X=152100&Y=565025&bgOpacity=80&bgLayer=voidLayer" target="_blank">http://mf-geoadmin0i.bgdi.admin.ch/?zoom=5&X=152100&Y=565025&bgOpacity=80&bgLayer=voidLayer</a><br>
> <<a href="http://mf-geoadmin0i.bgdi.admin.ch/?zoom=5&X=152100&Y=565025&bgOpacity=80&bgLayer=voidLayer" target="_blank">http://mf-geoadmin0i.bgdi.admin.ch/?zoom=5&X=152100&Y=565025&bgOpacity=80&bgLayer=voidLayer</a>><br>
><br>
> After investigation, it seems that the image size is huge: "overflow:<br>
> hidden; position: absolute; z-index: 1; left: -6562px; top: -9689px;<br>
> width: 24000px; height: 16000px;" This is normal, but it seems that IE<br>
> doesn't like that. Is this limitation already known ? Do you see any<br>
> workaround (or other ways to create an opacity layer) ?<br>
><br>
<br>
</div></div>We did notice this limitation sometime shortly after adding the Image<br>
layer. A quick workaround is to use a white.png that is bigger than 1x1.<br>
<br>
If you want to wander from the API, you could set the following:<br>
<br>
layer.tile.imgDiv.style.backgroundColor = "white"<br>
<font color="#888888"><br>
Tim<br>
</font><div class="im"><br>
> Thanks,<br>
> Cédric<br>
><br>
><br>
><br>
> --<br>
> Welcome to my world: <a href="http://www.cedricmoullet.com/" target="_blank">http://www.cedricmoullet.com/</a><br>
> My Linked In profile: <a href="http://www.linkedin.com/in/cedricmoullet" target="_blank">http://www.linkedin.com/in/cedricmoullet</a><br>
> Twitter: <a href="http://twitter.com/cedricmoullet" target="_blank">http://twitter.com/cedricmoullet</a><br>
><br>
><br>
><br>
</div><div><div></div><div class="h5">> _______________________________________________<br>
> Dev mailing list<br>
> <a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br>
> <a href="http://openlayers.org/mailman/listinfo/dev" target="_blank">http://openlayers.org/mailman/listinfo/dev</a><br>
<br>
<br>
--<br>
Tim Schaub<br>
OpenGeo - <a href="http://opengeo.org" target="_blank">http://opengeo.org</a><br>
Expert service straight from the developers.<br>
_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/dev" target="_blank">http://openlayers.org/mailman/listinfo/dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Welcome to my world: <a href="http://www.cedricmoullet.com/">http://www.cedricmoullet.com/</a><br>My Linked In profile: <a href="http://www.linkedin.com/in/cedricmoullet">http://www.linkedin.com/in/cedricmoullet</a><br>
Twitter: <a href="http://twitter.com/cedricmoullet">http://twitter.com/cedricmoullet</a><br>