[OpenLayers-Users] limit map to maxExtent?
ashlin
openlayers at yahoo.com.sg
Thu Jan 8 02:41:38 EST 2009
Hi,
I have the same problem too. May i know is it possible to keep panning
within max extent?
Best Regards,
Ashlin
bartvde wrote:
>
> Hi list,
>
> is there a way to limit the map to its maxExtent? Right now I can pan
> outside of the maxExtent.
>
> I tried adding a check to setCenter in Map.js:
>
> ..
> var bounds = this.getExtent();
> if (!this.maxExtent.containsBounds(bounds))
> {
> return false;
> }
>
> but that does not seem to do the job.
>
> Any help appreciated.
>
> Best regards,
> Bart
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/limit-map-to-maxExtent--tp1825039p2126763.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list