[OpenLayers-Users] How to remove the extra blank margins in the Layer.Image example?

Alexandre Saunier alexandre.saunier at camptocamp.com
Tue Jun 7 06:32:06 EDT 2011


Hi Andreas,

thanks for the tip! Adding a restrictedExtent param to the map options
indeed works: blank margins are removed.

One drawback is that a "wrapDateLine: true" param in the image layer
options is no more effective => it is no more possible to infinitly
pan to the left or the right as it was when restrictedExtent was not
set.

alex

2011/6/2 Andreas Hocevar <ahocevar at opengeo.org>:
> Hi,
>
> you can do this by setting the restrictedExtent of the map or
> baseLayer to the extent of the image.
>
> Andreas.
>
> On Wed, Jun 1, 2011 at 11:21 AM, Alexandre Saunier
> <alexandre.saunier at camptocamp.com> wrote:
>> Hello,
>>
>> in the image layer example
>> http://openlayers.org/dev/examples/image-layer.html
>>
>> if one pans to the ends of the image (vertically or horizontally),
>> blank margins appear and take half of the map. I guess it is not a
>> normal behaviour. Does anyone know how to get rid of these margins?
>>
>> Thanks,
>> alex
>> _______________________________________________
>> 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