Hi,
Yes Andreas, using console as you said, I get two navigation controls, one
added to map as a control, and a seccond added as a geoext action to get a pan
button in the toolbar.
I've dropped the seccond because is not necesary.
Anyway, I've configured control with: mouseWheelOptions: {interval: 20,
cumulative: false}
Best regards,
Antoni Vidal
Unitat d'Aplicacions SIG-WEB
Institut Cartogràfic de Catalunya
Parc de Montjuïc, E-08038 Barcelona
Tel. (+34) 93 567 15 00 (ext. 3228)
www.icc.cat
-----Missatge original-----
De: [email protected] [mailto:[email protected]] En nom de
Andreas Hocevar
Enviat: jueves, 26 de enero de 2012 16:25
Per a: Vidal, Antoni
A/c: [email protected]
Tema: Re: [OpenLayers-Users] mousewheel jumps two zoom levels
My guess is that you have two Navigation controls. One that is added to the map
by default unless you configure it with your custom array of controls, and the
navControl you added.
You can check in the javascript console by trying
map.getControlsByClass("OpenLayers.Control.Navigation");
and see if it returns an array of length 1 or 2.
The obvious fix is to configure the map with your own default set of controls.
Andreas.
On Thu, Jan 26, 2012 at 3:29 PM, Vidal, Antoni <[email protected]> wrote:
> Hi list,
>
>
>
> I've an OpenLayers.control.Navigation with following config options:
>
>
>
> var navControl = new OpenLayers.Control.Navigation({
>
> type: OpenLayers.Control.TYPE_TOGGLE,
>
> zoomWheelEnabled: true,
>
> mouseWheelOptions: {interval: 1}
>
> });
>
>
>
> But when user changes map zoom level using mousewheel, map zoomlevel
> jumps from 0 to 2 and then to 4, etc.
>
>
>
> Is possible to change this behaviour and force change zoomlevel one by one ?
>
>
>
> Thanks in advance.
>
>
>
> Antoni Vidal
>
> Unitat d'Aplicacions SIG-WEB
> Institut Cartogràfic de Catalunya
> Parc de Montjuïc, E-08038 Barcelona
> Tel. (+34) 93 567 15 00 (ext. 3228)
> www.icc.cat
>
>
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users