<div dir="ltr">Thanks Rob - added &amp; commited.&nbsp;<div><br></div><div><br><div class="gmail_quote">On Tue, Sep 23, 2008 at 2:25 PM, Rob Moran <span dir="ltr">&lt;<a href="mailto:Rob.Moran@opp-links.org.uk">Rob.Moran@opp-links.org.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Matt,<br>
<br>
I have extended mapstraction to do this, google maps implementation<br>
only, I&#39;m afraid:<br>
<br>
// ---------------------------------<br>
// Mapstraction Extensions - Zooming<br>
// ---------------------------------<br>
<br>
// Enable continuous zoom (required for scroll wheel zooming)<br>
Mapstraction.prototype.enableContinuousZoom = function()<br>
{<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if(this.loaded[this.api] == false)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;myself = this;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.onload[this.api].push(function()<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;myself.enableContinuousZoom();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;});<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;var map = this.maps[this.api];<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;switch (this.api)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;google&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.enableContinuousZoom();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;yahoo&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;openlayers&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;openstreetmap&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;multimap&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;mapquest&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;alert(this.api + &#39; not supported by<br>
Mapstraction.enableContinuousZoom&#39;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
}<br>
<br>
// Enable scroll wheel zooming<br>
Mapstraction.prototype.enableScrollWheelZoom = function()<br>
{<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if(this.loaded[this.api] == false)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;myself = this;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.onload[this.api].push(function()<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;myself.enableScrollWheelZoom();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;});<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;var map = this.maps[this.api];<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;switch (this.api)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;google&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.enableScrollWheelZoom();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;yahoo&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;openlayers&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;openstreetmap&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;multimap&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &#39;mapquest&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;alert(this.api + &#39; not supported by<br>
Mapstraction.enableScrollWheelZoom&#39;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
}<br>
<br>
Rob Moran<br>
Technical Development Manager<br>
Opportunity Links, Trust Court, The Vision Park, Histon, Cambridge, CB24<br>
9PW<br>
T 01223 566 522 F 01223 500 281 &nbsp;<a href="http://www.opp-links.org.uk" target="_blank">www.opp-links.org.uk</a><br>
Opportunity Links LTD registered in England no: 3565647. Registered<br>
Office: Trust Court, The Vision Park, Histon, Cambs. CB24 9PW<br>
<br>
This email message is private and for use by the addressee only. It may<br>
contain information, which is privileged and confidential. If you<br>
receive this in error please return to sender by reply and delete the<br>
message from your computer. You are not authorised to and must not<br>
disclose, copy, distribute or retain the message or any part of it.<br>
<div><div></div><div class="Wj3C7c"><br>
-----Original Message-----<br>
From: <a href="mailto:mapstraction-bounces@lists.mapstraction.com">mapstraction-bounces@lists.mapstraction.com</a><br>
[mailto:<a href="mailto:mapstraction-bounces@lists.mapstraction.com">mapstraction-bounces@lists.mapstraction.com</a>] On Behalf Of Matt<br>
Fletcher<br>
Sent: 22 September 2008 09:32<br>
To: <a href="mailto:mapstraction@lists.mapstraction.com">mapstraction@lists.mapstraction.com</a><br>
Subject: [Mapstraction] Zoom with Scrollwheel<br>
<br>
Hello,<br>
I&#39;m wondering whether it&#39;s possible to use the scrollwheel to zoom the<br>
map in mapstraction, and if so, what code do I need to add to my<br>
install?<br>
<br>
Thanks, Matt<br>
_______________________________________________<br>
Mapstraction mailing list<br>
<a href="mailto:Mapstraction@lists.mapstraction.com">Mapstraction@lists.mapstraction.com</a><br>
<a href="http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com" target="_blank">http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com</a><br>
_______________________________________________<br>
Mapstraction mailing list<br>
<a href="mailto:Mapstraction@lists.mapstraction.com">Mapstraction@lists.mapstraction.com</a><br>
<a href="http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com" target="_blank">http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Andrew Turner<br>mobile: 248.982.3609<br><a href="mailto:andrew@mapufacture.com">andrew@mapufacture.com</a> <br><a href="http://highearthorbit.com">http://highearthorbit.com</a><br>
<br><a href="http://mapufacture.com">http://mapufacture.com</a> Helping build the Geospatial Web<br>Introduction to Neogeography - <a href="http://oreilly.com/catalog/neogeography">http://oreilly.com/catalog/neogeography</a><br>

</div></div>