<html>
<head>
</head>
<body>
I could easily implement a new variable like your "zoomLevel"...I was already
thinking that I needed to do that. &nbsp;And I've got a series of little buttons
next to my map that make up a zoom bar like yours, and each button (when
clicked) makes a call to a javascript function that I've written called "zoomTo".
&nbsp;So I've got the framework there, I just can't figure out how to set my imgext
based on this zoomLevel factor (relative to my map's maximum extent, not
the current zoom level). &nbsp;I'd like to do just what you're doing on your page
and have each zoom button present the same imgext and zoom level each time...right
now I'm just incrementing the Mapserver variable "zoom" and "zoomsize" and
the buttons build on the last zoom, instead of always zooming to a set factor
relative to max extent. &nbsp;I don't want to ask you for your proprietary source
code, but can you shed any light on what kind of algorithm I might use to
determine the new imgext as a function of max extent and zoomLevel?<br>
<br>
Also, as Puneet pointed out, I will not be overriding the mouse click coordinates
with this zoom level, so that the zooming will happen relative to whatever
image center the user has already clicked on, and if they haven't clicked
anywhere then I'll zoom straight into the centerpoint of my main map.<br>
<br>
Thanks!<br>
<br>
<br>
<br>
Joe Bussell wrote:<br>
<blockquote type="cite" cite="mid:20020927174507.GA32281@otsys.com">
  <pre wrap=""><a class="moz-txt-link-abbreviated" href="http://www.TrafficDodger.com">www.TrafficDodger.com</a> has just such a zoom bar.  I view it like fliing<br>at different altitudes.  The higher you go, the more area you see and<br>you see less detail.  I use a zoomLevel variable in my javascript.  Each<br>button triggers a call to zoomToLevel with its own arguments.  Regular<br>zoomIn and zoomOut increment and decrement this value.  I then determine<br>the extent based on some function of the zoomLevel and my full scale<br>range.<br><br>Cordially,<br><br>Joe Bussell<br>On Time Systems<br><a class="moz-txt-link-abbreviated" href="http://www.TrafficDodger.com">www.TrafficDodger.com</a><br><br><br><br>On Fri, Sep 27, 2002 at 09:45:06AM -0500, Mike Smith wrote:<br></pre>
  <blockquote type="cite">
    <pre wrap="">Sorry to bother everyone with this, I know this has been addressed <br>before in the archives, but I can't seem to find it when I search them.<br><br>I'm trying to enable a Zoom In/Zoom Out bar along side my map (kinda <br>like Mapquest or Yahoo maps) where there are buttons that either zoom <br>the user in or out to pre-determined levels.  I've got Javascript code <br>that zooms in and out ok, but the logic is what's throwing me off.  I <br>want the bottom button to always be the same view, not zoom them out 15 <br>times from whatever their present view is.... it should zoom them out 15 <br>times from full extent.  I want "full extent" to be the base and each <br>button whether it's a zoom in or out button needs to always zoom them to <br>the same factor relative to full extent, not their current view...make <br>sense?  I know I've seen a Mapserver page before that had this little <br>zoom bar that I'm describing, but I can't remember where I saw it. <br>Any
body have a web page that does this?  Or example code that handles <br>the logic of pre-defined absolute zoom levels (as opposed to the <br>relative ones that the CGI variable "zoom" sets)?<br><br>Thanks<br><br><br></pre>
    </blockquote>
    <pre wrap=""><!----><br></pre>
    </blockquote>
    <br>
    </body>
    </html>