[OpenLayers-Users] Disable zoom limitations without disabling wrapDateLine

Andreas Hocevar ahocevar at opengeo.org
Wed Dec 12 03:20:35 PST 2012


Hi,

there is currently no API compliant way to do this. It would not be
hard to add an option for it though. The method that applies this
restriction is OpenLayers.Map::adjustZoom. Maybe you want to submit a
pull request? If not, although the adjustZoom method is not part of
the API, a quick and unsupported hack would be to set a map option:

    adjustZoom: function(zoom) { return zoom; }

Andreas.

On Tue, Dec 11, 2012 at 9:09 PM, Robbie MacKay <robbie at ushahidi.com> wrote:
> Hi All,
>
> I'm trying to figure out if there is a way to disable the zoom limitations -
> i.e. allow zooming out to more that one world visible - without disabling
> wrapDateLine?
>
> This used to be the behaviour before OL 2.12 - but this changed in 2.12
> "OpenLayers won't zoom out to resolutions where more than one world is
> visible any more. For maps that have base layers with wrapDateLine set to
> false, no zoom restrictions apply."
> https://github.com/openlayers/openlayers/blob/master/notes/2.12.md#changes-when-base-layer-configured-with-wrapdateline-true
>
> The reason I want to do this is a have a few maps where dimensions are such
> that to zoom out enough to show the full world they end up overlapping the
> date line slightly. However after upgrading to 2.12 I can no longer zoom out
> fully.
>
> --
> Robbie Mackay
>
> Software Developer, External Projects
> Ushahidi Inc
> e: robbie at ushahidi.com
> skype: robbie.mackay
>
>
> _______________________________________________
> 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