[OpenLayers-Users] Zooming with mouseWheel causes zooming by 2 levels instead of 1

Bart van den Eijnden bartvde at osgis.nl
Wed Jun 9 01:04:47 EDT 2010


Hi,

you've got 2 Navigation controls in your control list.

Best regards,
Bart

On Jun 9, 2010, at 1:21 AM, Alessandro Ferrucci wrote:

> Hello,
> I have a map and when I zoom using the mouse wheel the map zooms by 2 zoom levels instead of 1 when I move the mouse wheel slightly.
> 
> instead if I double click the map or click up or down on the zoom control it zooms in or out by 1 zoom level.
> 
> Here is the relevant code:
> 
> map = new OpenLayers.Map(
>                     'map',
>                     {
>                         'maxResolution':'auto',
>                         'tileSize':new OpenLayers.Size(200,200),
>                         maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90),
>                         controls:[
>                             new OpenLayers.Control.Navigation(),
>                             new OpenLayers.Control.ArgParser(),
>                             new OpenLayers.Control.Attribution(),
>                             new OpenLayers.Control.PanZoomBar({ position: new OpenLayers.Pixel(2, 15) }),
>                             new OpenLayers.Control.Navigation(),
>                             new OpenLayers.Control.Scale($('scale')),
>                             new OpenLayers.Control.LayerSwitcher(),
>                             new OpenLayers.Control.MousePosition(),
>                             new OpenLayers.Control.Permalink()
>                         ]
>                     }
>                 );
>                 
>                 layer0 = new OpenLayers.Layer.WMS(
>                     "CIRA Base Layer", urlArray,
>                     {
>                         layers:'cira_base',
>                         format:'image/png',
>                         bgcolor: '#99B3CC'
>                     },
>                     {singleTile:false, transitionEffect: 'resize'}
>                 );
> 
> map.addLayers([layer0]);
>                 
>                 map.zoomToMaxExtent();
>                 
>                 map.setCenter(new OpenLayers.LonLat(-100.42306,40.35960),1);
> 
> Any ideas as to why this would be happening?
> 
> thank you very much!
> 
> -- 
> Signed,
> Alessandro Ferrucci
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list