<div dir="ltr">Thanks Rob - added & commited. <div><br></div><div><br><div class="gmail_quote">On Tue, Sep 23, 2008 at 2:25 PM, Rob Moran <span dir="ltr"><<a href="mailto:Rob.Moran@opp-links.org.uk">Rob.Moran@opp-links.org.uk</a>></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'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>
if(this.loaded[this.api] == false)<br>
{<br>
myself = this;<br>
this.onload[this.api].push(function()<br>
{<br>
myself.enableContinuousZoom();<br>
});<br>
return;<br>
}<br>
<br>
var map = this.maps[this.api];<br>
<br>
switch (this.api)<br>
{<br>
case 'google':<br>
map.enableContinuousZoom();<br>
break;<br>
case 'yahoo':<br>
case 'openlayers':<br>
case 'openstreetmap':<br>
case 'multimap':<br>
case 'mapquest':<br>
alert(this.api + ' not supported by<br>
Mapstraction.enableContinuousZoom');<br>
break;<br>
}<br>
}<br>
<br>
// Enable scroll wheel zooming<br>
Mapstraction.prototype.enableScrollWheelZoom = function()<br>
{<br>
if(this.loaded[this.api] == false)<br>
{<br>
myself = this;<br>
this.onload[this.api].push(function()<br>
{<br>
myself.enableScrollWheelZoom();<br>
});<br>
return;<br>
}<br>
<br>
var map = this.maps[this.api];<br>
<br>
switch (this.api)<br>
{<br>
case 'google':<br>
map.enableScrollWheelZoom();<br>
break;<br>
case 'yahoo':<br>
case 'openlayers':<br>
case 'openstreetmap':<br>
case 'multimap':<br>
case 'mapquest':<br>
alert(this.api + ' not supported by<br>
Mapstraction.enableScrollWheelZoom');<br>
break;<br>
}<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 <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'm wondering whether it'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>