<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: OpenLayers disable mouse wheel on zoom</title>
	<atom:link href="/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/feed/" rel="self" type="application/rss+xml" />
	<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: PauGC</title>
		<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/comment-page-1/#comment-21631</link>
		<dc:creator><![CDATA[PauGC]]></dc:creator>
		<pubDate>Mon, 24 Mar 2014 08:45:06 +0000</pubDate>
		<guid isPermaLink="false">/?p=603#comment-21631</guid>
		<description><![CDATA[Another solution is to set to false directly the var before generating the map.

&lt;code&gt;
var nav = new OpenLayers.Control.Navigation();
nav.zoomWheelEnabled = false;
var options = {controls: [Nav,]};
var map = new OpenLayers.Map(&quot;Map&quot;, options);
&lt;/code&gt;

Then the mousewheel will be disabled.]]></description>
		<content:encoded><![CDATA[<p>Another solution is to set to false directly the var before generating the map.</p>
<p><code><br />
var nav = new OpenLayers.Control.Navigation();<br />
nav.zoomWheelEnabled = false;<br />
var options = {controls: [Nav,]};<br />
var map = new OpenLayers.Map("Map", options);<br />
</code></p>
<p>Then the mousewheel will be disabled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mro</title>
		<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/comment-page-1/#comment-19215</link>
		<dc:creator><![CDATA[mro]]></dc:creator>
		<pubDate>Thu, 22 Aug 2013 15:28:06 +0000</pubDate>
		<guid isPermaLink="false">/?p=603#comment-19215</guid>
		<description><![CDATA[thy, very helpful!]]></description>
		<content:encoded><![CDATA[<p>thy, very helpful!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adhiemsumitro</title>
		<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/comment-page-1/#comment-18476</link>
		<dc:creator><![CDATA[adhiemsumitro]]></dc:creator>
		<pubDate>Thu, 07 Feb 2013 10:37:36 +0000</pubDate>
		<guid isPermaLink="false">/?p=603#comment-18476</guid>
		<description><![CDATA[I confirmed that Dan King&#039;s methode is working
&lt;code&gt;
controls = map.getControlsByClass(&#039;OpenLayers.Control.Navigation&#039;);
for(var i = 0; i &#060; controls.length; ++i)
     controls[i].disableZoomWheel();
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>I confirmed that Dan King&#8217;s methode is working<br />
<code><br />
controls = map.getControlsByClass('OpenLayers.Control.Navigation');<br />
for(var i = 0; i &lt; controls.length; ++i)<br />
     controls[i].disableZoomWheel();<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/comment-page-1/#comment-16629</link>
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Mon, 24 Sep 2012 23:11:00 +0000</pubDate>
		<guid isPermaLink="false">/?p=603#comment-16629</guid>
		<description><![CDATA[Every single thing about Openlayers needs a 

&quot;How to make it really work&quot;

section. Thanks for this!]]></description>
		<content:encoded><![CDATA[<p>Every single thing about Openlayers needs a </p>
<p>&#8220;How to make it really work&#8221;</p>
<p>section. Thanks for this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan King</title>
		<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/comment-page-1/#comment-16494</link>
		<dc:creator><![CDATA[Dan King]]></dc:creator>
		<pubDate>Wed, 22 Aug 2012 15:15:10 +0000</pubDate>
		<guid isPermaLink="false">/?p=603#comment-16494</guid>
		<description><![CDATA[There are two typos in your code. Once fixed it works great. Thanks!

&lt;pre lang=&quot;javascript&quot;&gt;
// WRONG:
controls = map.getControlsByClass(&#039;OpenLayers.Control.Navigation&#039;);
for(var I = 0; i &#060; controls.length; ++i)
     controls.disableZoomWheel();
&lt;pre&gt;

&lt;pre lang=&quot;javascript&quot;&gt;
RIGHT:
controls = map.getControlsByClass(&#039;OpenLayers.Control.Navigation&#039;);
for(var i = 0; i &#060; controls.length; ++i)
     controls[i].disableZoomWheel();
&lt;pre&gt;]]></description>
		<content:encoded><![CDATA[<p>There are two typos in your code. Once fixed it works great. Thanks!</p>
<pre lang="javascript">
// WRONG:
controls = map.getControlsByClass('OpenLayers.Control.Navigation');
for(var I = 0; i &lt; controls.length; ++i)
     controls.disableZoomWheel();
</pre>
<pre>

</pre>
<pre lang="javascript">
RIGHT:
controls = map.getControlsByClass('OpenLayers.Control.Navigation');
for(var i = 0; i &lt; controls.length; ++i)
     controls[i].disableZoomWheel();
</pre>
<pre></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Spencer</title>
		<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/comment-page-1/#comment-16046</link>
		<dc:creator><![CDATA[Paul Spencer]]></dc:creator>
		<pubDate>Wed, 20 Jun 2012 01:23:55 +0000</pubDate>
		<guid isPermaLink="false">/?p=603#comment-16046</guid>
		<description><![CDATA[The problem is likely that you have two navigation controls.  When you create a map object, it automatically creates a navigation control unless you pass a controls option to the map constructor.  If you plan to add controls later, pass controls:[], otherwise make your controls and pass them as an array to the map constructor.]]></description>
		<content:encoded><![CDATA[<p>The problem is likely that you have two navigation controls.  When you create a map object, it automatically creates a navigation control unless you pass a controls option to the map constructor.  If you plan to add controls later, pass controls:[], otherwise make your controls and pass them as an array to the map constructor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shri</title>
		<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/comment-page-1/#comment-13379</link>
		<dc:creator><![CDATA[Shri]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 15:56:23 +0000</pubDate>
		<guid isPermaLink="false">/?p=603#comment-13379</guid>
		<description><![CDATA[Just to be clear to other users, who might not be programmers, let me add this:

Look at this line:
&lt;pre lang=&quot;javascript&quot;&gt;
  controls.disableZoomWheel();
&lt;/pre&gt;
It should be:
&lt;pre lang=&quot;javascript&quot;&gt;
  controls[i].disableZoomWheel();
&lt;/pre&gt;

PS: Also make sure your variable are all the same case.  ( for var i=0, ...)]]></description>
		<content:encoded><![CDATA[<p>Just to be clear to other users, who might not be programmers, let me add this:</p>
<p>Look at this line:</p>
<pre lang="javascript">
  controls.disableZoomWheel();
</pre>
<p>It should be:</p>
<pre lang="javascript">
  controls[i].disableZoomWheel();
</pre>
<p>PS: Also make sure your variable are all the same case.  ( for var i=0, &#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ch</title>
		<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/comment-page-1/#comment-12984</link>
		<dc:creator><![CDATA[ch]]></dc:creator>
		<pubDate>Thu, 06 May 2010 15:35:35 +0000</pubDate>
		<guid isPermaLink="false">/?p=603#comment-12984</guid>
		<description><![CDATA[I had to add the code for removing the zoomWheel at the end, after adding all other controls to the map. It seems that other controls are adding NavigationControl too.

var navCtrls = map.getControlsByClass(&#039;OpenLayers.Control.Navigation&#039;);
for (var i = 0; i &#060; navCtrls.length; i++) {
   navCtrls[i].disableZoomWheel();
}]]></description>
		<content:encoded><![CDATA[<p>I had to add the code for removing the zoomWheel at the end, after adding all other controls to the map. It seems that other controls are adding NavigationControl too.</p>
<p>var navCtrls = map.getControlsByClass(&#8216;OpenLayers.Control.Navigation&#8217;);<br />
for (var i = 0; i &lt; navCtrls.length; i++) {<br />
   navCtrls[i].disableZoomWheel();<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shaun</title>
		<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/comment-page-1/#comment-12945</link>
		<dc:creator><![CDATA[shaun]]></dc:creator>
		<pubDate>Sat, 01 May 2010 05:08:28 +0000</pubDate>
		<guid isPermaLink="false">/?p=603#comment-12945</guid>
		<description><![CDATA[I needed to disable all controls for an OpenLayers google map without much success, but the way to do it seems to be creating the map with an empty control array like so: 

map = new OpenLayers.Map(&quot;divMap&quot;, { controls: [] })

You could then add any specific controls required.]]></description>
		<content:encoded><![CDATA[<p>I needed to disable all controls for an OpenLayers google map without much success, but the way to do it seems to be creating the map with an empty control array like so: </p>
<p>map = new OpenLayers.Map(&#8220;divMap&#8221;, { controls: [] })</p>
<p>You could then add any specific controls required.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoimen</title>
		<link>/2009/06/20/openlayers-disable-mouse-wheel-on-zoom/comment-page-1/#comment-3830</link>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
		<pubDate>Tue, 21 Jul 2009 07:29:10 +0000</pubDate>
		<guid isPermaLink="false">/?p=603#comment-3830</guid>
		<description><![CDATA[Strange enough but it doesn&#039;t work for me! I tried with that code before and it wasn&#039;t working again. After applying the code I mention in the code everything was just fine.

greetings]]></description>
		<content:encoded><![CDATA[<p>Strange enough but it doesn&#8217;t work for me! I tried with that code before and it wasn&#8217;t working again. After applying the code I mention in the code everything was just fine.</p>
<p>greetings</p>
]]></content:encoded>
	</item>
</channel>
</rss>
