<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=us-ascii"><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;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 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.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal style='text-autospace:none'>I have a map of Singapore using an ArcGIS93Rest layer in EPSG:3414<span style='font-size:9.5pt;font-family:Consolas'>.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal>The map has 9 zoom levels defined by resolutions [76.4372195411057,<o:p></o:p></p><p class=MsoNormal> 38.2186097705529,<o:p></o:p></p><p class=MsoNormal> 19.1093048852764,<o:p></o:p></p><p class=MsoNormal> 9.55465244263822,<o:p></o:p></p><p class=MsoNormal> 4.77732622131911,<o:p></o:p></p><p class=MsoNormal> 2.38866311065955,<o:p></o:p></p><p class=MsoNormal> 1.19433155532978,<o:p></o:p></p><p class=MsoNormal> 0.597165777664889,<o:p></o:p></p><p class=MsoNormal> 0.298450596901194];<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>It start up at zoom level 5.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The problem is that the PanZoomBar control, while drawn correctly, generates the wrong zoom level if dragged to either extent – it should range between 0 and 8, but often calculates the zoom as -1 to 10. Consequently, if you drag to either extreme, nothing happens. Dragging anywhere else on the zoom bar generally seems OK.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The problem doesn’t seem to occur if you zoom by clicking on the zoom bar.<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal>In the zoomBarUp handler, the code that calculates the zoom is:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:blue'>var</span><span style='font-size:9.5pt;font-family:Consolas'> deltaY = <span style='color:blue'>this</span>.zoomStart.y - evt.xy.y;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:blue'>var</span><span style='font-size:9.5pt;font-family:Consolas'> zoomLevel = <span style='color:blue'>this</span>.map.zoom;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'>zoomLevel += Math.round(deltaY / <span style='color:blue'>this</span>.zoomStopHeight);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:blue'>this</span><span style='font-size:9.5pt;font-family:Consolas'>.map.zoomTo(zoomLevel);<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The problem is that <span style='font-size:9.5pt;font-family:Consolas'>deltaY / <span style='color:blue'>this</span>.zoomStopHeight </span>is generating values that are too large when you zoom to an extent.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I haven’t modified the controls or graphics in the control. I’m only viewing the map in FF 3.6 and IE 8.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>For the moment, I’ve hacked the code to correct the zoom levels if they go out-of-range. But I’d prefer to find out why this is happening.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><b><span style='font-family:"Verdana","sans-serif";color:gray'>Rohan Parkes</span></b><b><span style='font-family:"Verdana","sans-serif";color:gray'><o:p></o:p></span></b></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>