[Mapserver-users] PanNorth, PanSouth, PanEast, PanWest
Denis Lalonde
denlalonde@yahoo.com
Wed, 8 Oct 2003 08:27:49 -0700 (PDT)
--0-828525050-1065626869=:12049
Content-Type: text/plain; charset=us-ascii
hey, not sure if this is the best way to do it...but this is how I managed to get it to work...
} else if ($_REQUEST["task"]=="pan") {
If ($_REQUEST["dir"]=="n") {
//NORTH
$CenterX=$MapOBJ->width/2;
$CenterY=$MapOBJ->height/2*0.75;
} else if ($_REQUEST["dir"]=="s") {
//SOUTH
$CenterX=$MapOBJ->width/2;
$CenterY=$MapOBJ->height/2*1.25;
} else if ($_REQUEST["dir"]=="e") {
//EAST
$CenterX=$MapOBJ->width/2*1.25;
$CenterY=$MapOBJ->height/2;
} else if ($_REQUEST["dir"]=="o") {
//WEST
$CenterX=$MapOBJ->width/2*0.75;
$CenterY=$MapOBJ->height/2 ;
} else if ($_REQUEST["dir"]=="sw") {
//SOUTH WEST
$CenterX=$MapOBJ->width/2*0.75;
$CenterY=$MapOBJ->height/2*1.25;
} else if ($_REQUEST["dir"]=="se") {
//SOUTH EAST
$CenterX=$MapOBJ->width/2*1.25;
$CenterY=$MapOBJ->height/2*1.25;
} else if ($_REQUEST["dir"]=="ne") {
//NORTH EAST
$CenterX=$MapOBJ->width/2*1.25;
$CenterY=$MapOBJ->height/2*0.75 ;
} else if ($_REQUEST["dir"]=="no") {
//NORTH WEST
$CenterX=$MapOBJ->width/2*0.75;
$CenterY=$MapOBJ->height/2*0.75 ;
}
$pan_extent = ms_newrectObj();
$pan_extent->setextent($extent_to_set[0],$extent_to_set[1],$extent_to_set[2],$extent_to_set[3]); //OLD EXTENTS
$pan_point = ms_newpointObj();
$pan_point->setXY($CenterX,$CenterY);
$MapOBJ->zoompoint(1,$pan_point,$MapOBJ->width,$MapOBJ->height,$pan_extent);
good luck,
Denis
"m soto ." <msoto002@eresmas.com> wrote:
I would like to include in my MapServer client the Pan with straight directions (PanNorth, PanSouth, PanEast, PanWest).
Can anyone help me on how to do this?
Thank you very much. Maria.
_______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
--0-828525050-1065626869=:12049
Content-Type: text/html; charset=us-ascii
<DIV>hey, not sure if this is the best way to do it...but this is how I managed to get it to work...</DIV>
<DIV> } else if ($_REQUEST["task"]=="pan") {<BR> If ($_REQUEST["dir"]=="n") {<BR> //NORTH<BR>
$CenterX=$MapOBJ->width/2;<BR> $CenterY=$MapOBJ->height/2*0.75;<BR> } else if ($_REQUEST["dir"]=="s") {<BR>
//SOUTH<BR> $CenterX=$MapOBJ->width/2;<BR> $CenterY=$MapOBJ->height/2*1.25;<BR> } else if ($_REQUEST["dir"]=="e")
{<BR> //EAST<BR> $CenterX=$MapOBJ->width/2*1.25;<BR> $CenterY=$MapOBJ->height/2;<BR> } e!
lse if
($_REQUEST["dir"]=="o") {<BR> //WEST<BR> $CenterX=$MapOBJ->width/2*0.75;<BR> $CenterY=$MapOBJ->height/2
;<BR> } else if ($_REQUEST["dir"]=="sw") {<BR> //SOUTH WEST<BR> $CenterX=$MapOBJ->width/2*0.75;<BR> &nbs!
p;
$CenterY=$MapOBJ->height/2*1.25;<BR> } else if ($_REQUEST["dir"]=="se") {<BR> //SOUTH EAST<BR>
$CenterX=$MapOBJ->width/2*1.25;<BR> $CenterY=$MapOBJ->height/2*1.25;<BR> } else if ($_REQUEST["dir"]=="ne") {<BR> //NORTH
EAST<BR> $CenterX=$MapOBJ->width/2*1.25;<BR> $CenterY=$MapOBJ->height/2*0.75 ;<BR> } else if ($_REQUEST["dir"]=="no")
{<BR> //NORTH WEST<BR> $CenterX=$MapOBJ->width/2*0.75;<BR> $CenterY=$MapOBJ->height/2*0.75 ;<BR> &nbs!
p;
}</DIV>
<DIV> </DIV>
<DIV> $pan_extent = ms_newrectObj();<BR> $pan_extent->setextent($extent_to_set[0],$extent_to_set[1],$extent_to_set[2],$extent_to_set[3]); //OLD EXTENTS<BR> $pan_point = ms_newpointObj();<BR>
$pan_point->setXY($CenterX,$CenterY);<BR> $MapOBJ->zoompoint(1,$pan_point,$MapOBJ->width,$MapOBJ->height,$pan_extent);</DIV>
<DIV> </DIV>
<DIV>good luck,</DIV>
<DIV>Denis<BR><BR><B><I>"m soto ." <msoto002@eresmas.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<TABLE cellPadding=8 width="100%" border=0>
<TBODY>
<TR>
<TD bgColor=#ffffff>
<P><SPAN style="FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: monospace">I would like to include in my MapServer client the Pan with straight directions (PanNorth, PanSouth, PanEast, PanWest). </SPAN></P>
<P><SPAN style="FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: monospace"></SPAN><SPAN style="FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: monospace">Can anyone help me on how to do this?</SPAN></P>
<P><SPAN style="FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: monospace">Thank you very much. Maria.<BR></SPAN></P></TD></TR></TBODY></TABLE>_______________________________________________ Mapserver-users mailing list Mapserver-users@lists.gis.umn.edu http://lists.gis.umn.edu/mailman/listinfo/mapserver-users</BLOCKQUOTE><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://shopping.yahoo.com/?__yltc=s%3A150000443%2Cd%3A22708228%2Cslk%3Atext%2Csec%3Amail">The New Yahoo! Shopping</a> - with improved product search
--0-828525050-1065626869=:12049--
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users