[OpenLayers-Users] How to create a mp without controls and without keyboard defaults

Andreas Hocevar ahocevar at opengeo.org
Tue Feb 21 06:07:04 EST 2012


Why not just

var map = new OpenLayers.Map("map", {controls: []});

Andreas.

On Tue, Feb 21, 2012 at 12:04 PM, Robert Buckley
<robertdbuckley at yahoo.com> wrote:
> Hi,
>
> Thanks....it works for keyboard defaults, but not for PanZoom
>
> var c=map.getControlsByClass('OpenLayers.Control.PanZoom');
> c[0].deactivate();
>
> ________________________________
> Von: Imran Rajjad <rajjad at gmail.com>
> An: Robert Buckley <robertdbuckley at yahoo.com>
> Cc: "users at openlayers.org" <users at openlayers.org>
> Gesendet: 11:59 Dienstag, 21.Februar 2012
> Betreff: Re: [OpenLayers-Users] How to create a mp without controls and
> without keyboard defaults
>
> var c=map.getControlsByClass("OpenLayers.Control.KeyboardDefaults");
> c[0].deactivate();
>
> this is how you disable keyboard controls, you can do the same for others
>
> regards,
>
> On Tue, Feb 21, 2012 at 3:53 PM, Robert Buckley <robertdbuckley at yahoo.com>
> wrote:
>
> Hi,
>
> I need to create a map without the ability to zoom or pan and a fixed area.
> I have removed all the controls fro the map object but I still get the
> panzoom and keyboard defaults. I guess restricted extent will freeze the
> map...but what about the mouse wheel and keyboard?
>
> Google doesn´t seem to have much!
>
> thanks for any advice,
>
> Rob
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
>
>
> --
> I.R
>
>
>
> _______________________________________________
> 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