[OpenLayers-Dev] Mouse Wheel

Christopher Schmidt crschmidt at metacarta.com
Fri Jul 18 09:23:31 EDT 2008


On Fri, Jul 18, 2008 at 03:07:00AM -0700, Kyle Mulka wrote:
> I was able to boil down what I was experiencing into a bare minimum
> chunk of code. Use your mouse wheel to zoom in and out of this map to
> see what I mean:
> http://www.kylemulka.com/temp/openlayers/funkywheel.html
> 
> Is that behavior expected given the code? I'm not sure why we decided
> to use the MouseDefaults control instead of Navigation. I'll have to
> ask my partner who wrote it.

Yes, this behavior is expected, given the code.

Specifically:
 * MouseDefaults is deprecated: no further work is being done to improve
   it.
 * The default control for all maps is the Navigation control
 * The support for doing the 'correct' mousewheel support was added 
   after MouseDefaults was deprecated.
 * Navigation control works as you want it; MouseDefaults works in a
   different way, and there is no plan to change it.
   
So, the answer to your problem is "use Control.Navigation instead."   

(If the code was written before 2.4, that would explain why it was
'wrong': Before 2.4, MouseDefaults was the 'way' to do it.)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list