[mapserver-users] Zoom to extents - NOT
Palmer, Steve
Steve_Palmer@lpsg.com
Mon, 21 Oct 2002 10:42:41 -0500
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C27918.7DD96390
Content-Type: text/plain;
charset="iso-8859-1"
A guess - your zoom variable is set to 2 or your zoomdir is set to 1 with a
zoomsize of 2
As part of your zoomall function you need to "handle" this (e.g., set zoom =
0 or zoomdir = 0)
-----Original Message-----
From: Murray, Ross [mailto:rmurray@NRCan.gc.ca]
Sent: Monday, October 21, 2002 8:05 AM
To: 'mapserver-users@lists.gis.umn.edu'
Subject: [mapserver-users] Zoom to extents - NOT
I am very new to MapServer and would appreciate any words of encouragement
you may provide before I am prematurely old.
I have a button on my HTML form called "zoomtoextents". There are seperate
buttons allowing the user to zoom in or zoom out to explore the image. The
theory was that at some point they may wish to see the entire map again, so
they should be able to do so by a single click of a button. The code I wrote
was:
function zoomall() {
document.forms[0].imgext.value = "[allext]" ;
document.forms[0].submit();
}
where "[allext]" is a constant that holds the bounding latitude/longitude
values of the map area (the value comes from a database and is set before
the mapserv.exe is called).
Problem:
No matter how much (or little) the image is zoomed, clicking
"zoomtoextents" returns an image at exactly half the maximum scale. For
example, when one of my sample maps loads for the first time, its extents
([allext]) are the bounding lat/long as described above and the scale is 1
to 500000. If I zoom in by any amount then click "zoomtoextents" I get a map
at 1 to 250000.
Go Figure?
<<Murray, Ross.vcf>>
------_=_NextPart_001_01C27918.7DD96390
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [mapserver-users] Zoom to extents - NOT</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>A guess - your zoom variable is set to 2 or your zoomdir is set to 1 with a zoomsize of 2</FONT>
</P>
<P><FONT SIZE=2>As part of your zoomall function you need to "handle" this (e.g., set zoom = 0 or zoomdir = 0)</FONT>
</P>
<BR>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Murray, Ross [<A HREF="mailto:rmurray@NRCan.gc.ca">mailto:rmurray@NRCan.gc.ca</A>]</FONT>
<BR><FONT SIZE=2>Sent: Monday, October 21, 2002 8:05 AM</FONT>
<BR><FONT SIZE=2>To: 'mapserver-users@lists.gis.umn.edu'</FONT>
<BR><FONT SIZE=2>Subject: [mapserver-users] Zoom to extents - NOT</FONT>
</P>
<BR>
<P><FONT SIZE=2>I am very new to MapServer and would appreciate any words of encouragement</FONT>
<BR><FONT SIZE=2>you may provide before I am prematurely old.</FONT>
</P>
<P><FONT SIZE=2>I have a button on my HTML form called "zoomtoextents". There are seperate</FONT>
<BR><FONT SIZE=2>buttons allowing the user to zoom in or zoom out to explore the image. The</FONT>
<BR><FONT SIZE=2>theory was that at some point they may wish to see the entire map again, so</FONT>
<BR><FONT SIZE=2>they should be able to do so by a single click of a button. The code I wrote</FONT>
<BR><FONT SIZE=2>was:</FONT>
</P>
<P><FONT SIZE=2>function zoomall() {</FONT>
<BR><FONT SIZE=2> document.forms[0].imgext.value = "[allext]" ;</FONT>
<BR> <FONT SIZE=2>document.forms[0].submit();</FONT>
<BR><FONT SIZE=2> }</FONT>
</P>
<P><FONT SIZE=2>where "[allext]" is a constant that holds the bounding latitude/longitude</FONT>
<BR><FONT SIZE=2>values of the map area (the value comes from a database and is set before</FONT>
<BR><FONT SIZE=2>the mapserv.exe is called).</FONT>
</P>
<P><FONT SIZE=2>Problem:</FONT>
<BR><FONT SIZE=2> No matter how much (or little) the image is zoomed, clicking</FONT>
<BR><FONT SIZE=2>"zoomtoextents" returns an image at exactly half the maximum scale. For</FONT>
<BR><FONT SIZE=2>example, when one of my sample maps loads for the first time, its extents</FONT>
<BR><FONT SIZE=2>([allext]) are the bounding lat/long as described above and the scale is 1</FONT>
<BR><FONT SIZE=2>to 500000. If I zoom in by any amount then click "zoomtoextents" I get a map</FONT>
<BR><FONT SIZE=2>at 1 to 250000.</FONT>
</P>
<P><FONT SIZE=2>Go Figure?</FONT>
</P>
<BR>
<P><FONT SIZE=2> <<Murray, Ross.vcf>> </FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C27918.7DD96390--