Sorry Brent - it's rather busy around here.  I'm CC:ing the list on this because I think enyone can benefit from this.  I'm just sorry that I haven't had time to package it up better.  I fear if I wait to do it right it won't happen, so here it all is :-)
<br><br>Everything is based on Chameleon 2.2.&nbsp; Only REALLY tested in IE6 and Firefox 1.0+<br><br><span style="font-weight: bold; text-decoration: underline;">1..&nbsp; ScaleZoom Widget for JSAPI mode.</span><br>the one I have built is rather convoluted, and a little bit buggy.&nbsp; If you use it with a fixed size of map, it might work much better.&nbsp; This one works with our dynamic map resize - which is probably part of the problem.&nbsp; I say it has problems, but they are intermittent and &lt;&nbsp; 2% of the time.
<br><br>So not to destroy/harm to the original scale zoom widget in Chameleon, we made our own widget: NLWISZoomBar<br>see attached zip file (<span style="font-weight: bold;">NLWISZoomBar.zip</span>).&nbsp; There are two files, a php widget file and the separate javascript.&nbsp;
Put this in your widgets directiory.<br><br>The following changes to UpdateMap.php will also be required.&nbsp; This is in chameleon/htdocs<br><div><span><font face="Arial" size="2">starting at around 216<br></font></span></div>


<div><span><font face="Arial" size="2">used this 
instead... (the COMPASS_POINT section is unchanged but shown so you know where to make changes).&nbsp; This changes was required because the SCALE_ZOOM navigation check was originally happening outside of NAV_CMD check which didn&#39;t make sense.&nbsp; This change brings it inside the NAV_CMD check.
<br></font></span></div>
<pre style="font-family: courier new,monospace;"><span>if (substr($HTTP_FORM_VARS[&quot;NAV_CMD&quot;], 0, 13) == &quot;COMPASS_POINT&quot;)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; include(&quot;widgets/CompassPoint/CompassPoint.widget.php&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $oWidget = new CompassPoint();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $oWidget-&gt;InitDefaults();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $oWidget-&gt;mszDirection = strtoupper(substr( $HTTP_FORM_VARS[&quot;NAV_CMD&quot;], 14 ));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $oWidget-&gt;SetMap($oMapSession);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $oWidget-&gt;SetURL($oHttpFormVars, $HTTP_FORM_VARS);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $_SESSION[&quot;gszCurrentState&quot;] = $oMapSession-&gt;saveState();</span></pre>
<pre style="font-family: courier new,monospace;"><span>&nbsp;&nbsp;&nbsp; }</span></pre>
<pre style="font-family: courier new,monospace;"><span>&nbsp;&nbsp;&nbsp; if ($HTTP_FORM_VARS[&quot;NAV_CMD&quot;] == &quot;SCALE_ZOOM&quot; &amp;&amp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isset( $HTTP_FORM_VARS[&quot;SCALE_ZOOM&quot;]) &amp;&amp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $HTTP_FORM_VARS[&quot;SCALE_ZOOM&quot;] != &quot;&quot;)
<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; include(&quot;widgets/ScaleZoom/ScaleZoom.widget.php&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $oWidget = new ScaleZoom();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $oWidget-&gt;InitDefaults();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $oWidget-&gt;SetMap($oMapSession);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $oWidget-&gt;SetURL($oHttpFormVars, $HTTP_FORM_VARS);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $_SESSION[&quot;gszCurrentState&quot;] = $oMapSession-&gt;saveState();</span></pre>
<pre style="font-family: courier new,monospace;"><span> &nbsp;&nbsp; }</span></pre>
<pre style="font-family: courier new,monospace;"><span>&nbsp;&nbsp;&nbsp; $szFormContents .= BuildHTMLOutputMapExtentsChanged($oMap);<br>}</span></pre>

Insert the following section around line 756 after saving of context, but <span style="font-weight: bold;">before</span> this line:<br><pre style="font-family: courier new,monospace;"><span>$_SESSION[&quot;gszCurrentState&quot;] = $oMapSession-&gt;saveState();
</span></pre>
Code to add:<br><span style="font-family: courier new,monospace;">if (isset( $HTTP_FORM_VARS[&quot;PROCESS_NLWISZOOMBAR&quot;]) &amp;&amp;
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $HTTP_FORM_VARS[&quot;PROCESS_NLWISZOOMBAR&quot;] == &quot;1&quot;)
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">{
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; include(&quot;widgets/NLWISZoomBar/NLWISZoomBar.widget.php&quot;);
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $oWidget = new NLWISZoomBar();
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $oWidget-&gt;InitDefaults();
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $oWidget-&gt;SetMap($oMapSession);
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $oWidget-&gt;SetURL($oHttpFormVars, $HTTP_FORM_VARS);
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $_SESSION[&quot;gszCurrentState&quot;] = $oMapSession-&gt;saveState();
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $nLevels = $HTTP_FORM_VARS[&quot;NLWISZOOMBAR_LEVELS&quot;];
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $oWidget-&gt;nMaxWidthFactor = $HTTP_FORM_VARS[&quot;NLWISZOOMBAR_MAXWIDTHFACTOR&quot;];
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $nMinScale = $oWidget-&gt;getMinScale();
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $nMaxScale = $oWidget-&gt;getMaxScale();
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $aScale = $oWidget-&gt;getZoomBarLevels($nLevels,$nMinScale,$nMaxScale);
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $szFormContents .= &quot;&lt;input type=\&quot;hidden\&quot; name=\&quot;UPDATE_NLWISZOOMBAR_SCALES&quot;.
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;\&quot; value=&#39;&quot;.implode(&quot;,&quot;,$aScale).&quot;&#39;&gt;\n&quot;;
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $szFormContents .= &quot;&lt;input type=\&quot;hidden\&quot; name=\&quot;UPDATE_NLWISZOOMBAR_CURRENTSCALE&quot;.
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;\&quot; value=&#39;&quot;.$oMapSession-&gt;oMap-&gt;scale.&quot;&#39;&gt;\n&quot;;
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br><br>The widget will recalculate the individual zoom scales based on the changing max and min scales (these depend on the size of the map which is why it&#39;s dynamic).&nbsp; The number of ticks is user defined, and uses CSS for styling. - see attached 
<span style="font-weight: bold;">zoombar.css</span> for what I use in our app.<br><br>How used in Template:<br><div style="font-family: courier new,monospace;"><font size="2">&lt;cwc2 type=&quot;NLWISZoomBar&quot; LEVELS=&quot;8&quot; 
zoominlabel=&quot;Zoom In&quot; zoomoutlabel=&quot;Zoom Out&quot; topelement=&quot;zoomBar&quot;&gt;&lt;/cwc2&gt;</font></div>
<div>&nbsp;</div> Ok.&nbsp; That&#39;s it for the ZooomBar!<br><br>For the Mapsizing... much more complicated, and my javascript is rather integrated against the template and CSS.<br><br>Basically though, I watch for window resize events (registered with JSAPI) and when they happen I change the size of all the other components on the page that matter - map (many layers here are affected), right side button container, left side tabbed pages container.
<br><br>I&#39;ll see if I can package it up separately and send it along next...&nbsp; Please don&#39;t hesitate to ask questions about what I&#39;ve already included.&nbsp; I did this quickly and it&#39;s possible I missed something.
<br><br>Cheers,<br><br>Liz<br><br><br><br><br><br><br><div><span class="gmail_quote">On 1/30/07, <b class="gmail_sendername">Brent Lund</b> &lt;<a href="mailto:Brent.Lund@state.mn.us" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Brent.Lund@state.mn.us
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="blue" lang="EN-US">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Hi Liz,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Just checking back with you to see if you
have time available to send the scripts mentioned below.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Thanks,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Brent</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> Liz Godwin [mailto:
<a href="mailto:godwin.liz@gmail.Com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">godwin.liz@gmail.Com</a>]
<br>
<b><span style="font-weight: bold;">Sent:</span></b> Tuesday, January 16, 2007
2:40 PM<br>
<b><span style="font-weight: bold;">To:</span></b> Brent Lund<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [Chameleon] jsapi and
scalezoom widget</span></font></p>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Hi Brent,<br>
<br>
I extended the mapsize widget to support JSAPI but also there&#39;s some javascript
there.&nbsp; It isn&#39;t very graceful.&nbsp; And the code could probably be done
better - but it works!<br>
<br>
I can send you that too.&nbsp; It&#39;s something I&#39;ve been meaning to give back to
the group, but I havn&#39;t had time to fix it up yet.&nbsp; Bear with me - I&#39;ll
try to get the code to you this week.... <br>
<br>
Liz</span></font></p>

<div>

<p><span><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On 1/16/07, <b><span style="font-weight: bold;">Brent
Lund</span></b> &lt;<a href="mailto:Brent.Lund@state.mn.us" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Brent.Lund@state.mn.us</a>&gt;
wrote:</span></font></span></p>

<div link="blue" vlink="blue">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Liz,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">I really like how your site auto fits the map to the size of
the browser.&nbsp;&nbsp;&nbsp; Is this done in a css? Or script? Both?</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Thanks again</span></font></p>

<div><span>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Brent</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> Liz Godwin [mailto:
<a href="mailto:godwin.liz@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">godwin.liz@gmail.com</a>] <br>
<b><span style="font-weight: bold;">Sent:</span></b> Monday, January 15, 2007
9:10 AM<br>
<b><span style="font-weight: bold;">To:</span></b> <a href="mailto:chameleon@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">chameleon@lists.maptools.org</a><br>
<b><span style="font-weight: bold;">Cc:</span></b> <a href="mailto:Brent.Lund@state.mn.us" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Brent.Lund@state.mn.us</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [Chameleon] jsapi and
scalezoom widget</span></font></p>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">We&#39;re using a slightlyolder version of Chameleon
(2.0?) - but in that the ScaleZoom widget wasn&#39;t jsapi enabled.&nbsp; We made
changes to enable it, but it&#39;s still a bit flakey (randomly), mostly just with
IE.<br>
<br>
I&#39;d be happy to share it with you or anyone else.&nbsp; Of course if you make
it better, please share back :-)<br>
<br>
It can be seen in action here (it&#39;s along the top of the map):<br>
<a href="http://nlwis-snite1.agr.gc.ca/eco/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://nlwis-snite1.agr.gc.ca/eco/</a><br>
<br>
Cheers,<br>
<br>
Liz</span></font></p>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On
1/11/07, <b><span style="font-weight: bold;">Brent Lund</span></b> &lt;<a href="mailto:Brent.Lund@state.mn.us" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Brent.Lund@state.mn.us </a>&gt;
wrote:</span></font></p>

<div link="blue" vlink="purple">

<div>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">My
ScaleZoom widget is not updated when in jsapi mode.&nbsp; &nbsp;It will updated
the map (zoom in/out), but ScaleZoom itself is not redrawn. &nbsp;Am I missing
something? </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Thanks,</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Brent</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&lt;CWC2
TYPE=&quot;ScaleZoom&quot;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">ORIENTATION=&quot;HORIZONTAL&quot;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">ENABLED=&quot;TRUE&quot;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">VISIBLE=&quot;TRUE&quot;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">INCREASEIMAGE=&quot;images/z-in2.png&quot;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">DECREASEIMAGE=&quot;images/z-out2.png&quot;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">CURRENTIMAGE=&quot;images/zoom_current.png&quot;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">PUTTABLETAGS=&quot;TRUE&quot;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&gt;&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;&nbsp;
&lt;ZOOMVALUE SCALE=&quot;100000&quot;
IMAGE=&quot;images/zoom_inc.png&quot;/&gt;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;&nbsp;
&lt;ZOOMVALUE SCALE=&quot;50000&quot;
IMAGE=&quot;images/zoom_inc.png&quot;/&gt;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;&nbsp;
&lt;ZOOMVALUE SCALE=&quot;20000&quot;
IMAGE=&quot;images/zoom_inc.png&quot;/&gt;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;&nbsp;
&lt;ZOOMVALUE SCALE=&quot;10000&quot;
IMAGE=&quot;images/zoom_inc.png&quot;/&gt;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;&nbsp;
&lt;ZOOMVALUE SCALE=&quot;5000&quot; IMAGE=&quot;images/zoom_inc.png&quot;/&gt;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&lt;/CWC2&gt;</span></font></p>

</div>

</div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
_______________________________________________<br>
Chameleon mailing list<br>
<a href="mailto:Chameleon@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Chameleon@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/chameleon" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.maptools.org/mailman/listinfo/chameleon</a></span></font></p>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

</span></div>

</div>

</div>

</div>



<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

</div>

</div>



</blockquote></div><br>