<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-postmall17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=SV link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Hi, <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span lang=EN-US>Fusion 1.1 is great, but zooming with the
scrollwheel doesn&#8217;t work. <a href="http://trac.osgeo.org/fusion/ticket/59">http://trac.osgeo.org/fusion/ticket/59</a>
(like in Zac&#8217;s case my map is in a locale coordinate system)<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I have been trying to figure out why, but I&#8217;ve
had some trouble and some success. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>So I started with figuring out that we don&#8217;t
get the same reply from the server when we use ordinary maps as when we use
baselayers maps. Something is happening inside OpenLayers. The same parameters
are sent from wheelChange to setExtents, after setExtents something is
happening that makes the map stay in the same scale.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>But what could be seen was that zooming in
using the zoom tool or the navigator worked, so my quick and dirty hack was to
copy some code from the navigator widget into wheelChange.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>(I know this code is ugly, but it kind of
works.)<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>    wheelChange: function(evt, deltaZ) {<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>var deltaRes = deltaZ &gt; 0 ? 0.5 : 2;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>var activeWidget = null;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        if (this.oActiveWidget) {<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>          activeWidget =
this.oActiveWidget;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>         
this.deactivateWidget(this.oActiveWidget);<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        }<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>                                                          <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        var center =
this.getCurrentCenter();<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        this.zoom(center.x, center.y,
deltaRes);<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>//Event.stop(e);<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        if (activeWidget) {<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>         
this.activateWidget(activeWidget);<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        }<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>},<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>This will work, but zooms into the center
of the map instead of where the cursor is. I tried to send a different center
to the zoom function, like the newCenter calculated in the original wheelChange
function, but it still kept zooming into the center of the map, even if I send
fixed coordinates like 0,0. This is just strange. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>So if anyone can make my code better or
find another solution it would be great. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Cheers<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Måns<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>-----------------------------------------------------------</span><span
style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Måns Beckman</span><span style='font-size:12.0pt;font-family:
"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Man and Machine</span><span style='font-size:12.0pt;font-family:
"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Fabriksgatan 13</span><span style='font-size:12.0pt;font-family:
"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>412 50 Göteborg</span><span style='font-size:12.0pt;font-family:
"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Phone: +46 31 - 762 8182</span><span style='font-size:12.0pt;
font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Mobile: +46 733 - 38 83 19</span><span style='font-size:12.0pt;
font-family:"Times New Roman","serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>