[Mapserver-users] Problems with zoomrectangle function

Benjamin Wragg bwragg at tpg.com.au
Sun Jan 12 17:21:13 EST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_0001_01C2BAE0.EDEE6720
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I=92m having some trouble with the zoomrectangle function, which I=92m =
using
with a JavaScript rubber band zoom tool I=92ve built.

=20

I=92m passing the following arguments in:=20

A rectangle object which contains the new extents in pixels

The map image width

The map image height

The map objects=92 current extent object.

=20

So my call to the function looks like this:

=20

$GLOBALS['map']->zoomrectangle($extentRectObj,$GLOBALS['map']->width,$GL
OBALS['map']->height,$GLOBALS['map']->extent);

=20

When I=92m zoomed to the full extent of my map file (-180, -90, 180, 90)
the rubber band zoom tool creates a new image but with no extents
changed. I can check this further by printing the map objects extent
values before and after the function call and they are the same.

=20

When I change my map extents so I=92m zoomed in on the map (I can do =
this
by using a tool which sets the extent coordinates manually), my tool
starts to work. I can=92t figure out why? No errors are being generated =
at
any of the times the zoom doesn=92t work.

=20

Thanks,

=20

Benjamin

=20

=20


------=_NextPart_000_0001_01C2BAE0.EDEE6720
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:Arial;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{font-family:Arial;
	color:windowtext;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>I&#8217;m
having some trouble with the zoomrectangle function, which I&#8217;m =
using with
a JavaScript rubber band zoom tool I&#8217;ve built.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>I&#8217;m
passing the following arguments in: </span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>A
rectangle object which contains the new extents in =
pixels</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>The
map image width</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>The
map image height</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>The map
objects&#8217; current extent object.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>So my
call to the function looks like this:</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>$GLOBALS['map']-&gt;zoomrectangle($extentRectO=
bj,$GLOBALS['map']-&gt;width,$GLOBALS['map']-&gt;height,$GLOBALS['map']-&=
gt;extent);</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>When
I&#8217;m zoomed to the full extent of my map file (-180, -90, 180, 90) =
the
rubber band zoom tool creates a new image but with no extents changed. I =
can
check this further by printing the map objects extent values before and =
after the
function call and they are the same.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>When I
change my map extents so I&#8217;m zoomed in on the map (I can do this =
by using
a tool which sets the extent coordinates manually), my tool starts to =
work. I
can&#8217;t figure out why? No errors are being generated at any of the =
times
the zoom doesn&#8217;t work.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial>&nbsp;</font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>Thanks,</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial>&nbsp;</font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>Benjamin</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>&nbsp;</span></font></p>

</div>

</body>

</html>

------=_NextPart_000_0001_01C2BAE0.EDEE6720--




More information about the mapserver-users mailing list