[Mapserver-users] ms_newprojectionObj - change from v3.6 to v4.0??

Debbie Pagurek pagurekd at agr.gc.ca
Tue Dec 16 16:17:51 EST 2003


This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=_6A348794.D0B1EE85
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

  Hi all,
I am trying to get some code that worked with php_mapscript_36.so to
work with php_mapscript_40.so but am having problems.

This worked before:
  $newproj=ms_newprojectionObj("proj=robin,lon_0=0,x_0=0,y_0=0");
  $latlon = 
ms_newprojectionObj("proj=longlat,ellps=GRS80,datum=NAD83,no_defs");

  $oldext= ms_newRectObj();
  $oldext->setextent($bounds[0],$bounds[1],$bounds[2],$bounds[3]); 
//the extent in latlong

  $newextproj = ms_newRectObj();
  $newextproj = $oldext->project($latlon,$newproj);  //the extent in
Robinson

 
$map->setextent($newextproj->minx,$newextproj->miny,$newextproj->maxx,$newextproj->maxy);

But now when I try to see the new map extents e.g.
echo "new ext minx = ".$newextproj->minx;
I'm getting nothing.

Has something else changed with Mapserver4 / php_mapscript_40.so?
Can anyone give me any pointers?

Thanks in advance.
D. Pagurek

--=_6A348794.D0B1EE85
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY style="MARGIN-TOP: 2px; FONT: 10pt Arial; MARGIN-LEFT: 2px">
<DIV><STRONG>&nbsp; </STRONG>Hi all,</DIV>
<DIV>I am trying to get some code that worked with&nbsp;php_mapscript_36.so to 
work with php_mapscript_40.so but am having problems.</DIV>
<DIV>&nbsp;</DIV>
<DIV>This worked before:</DIV>
<DIV>&nbsp; 
$newproj=ms_newprojectionObj("proj=robin,lon_0=0,x_0=0,y_0=0");<BR>&nbsp; 
$latlon =&nbsp; 
ms_newprojectionObj("proj=longlat,ellps=GRS80,datum=NAD83,no_defs");<BR><BR>&nbsp; 
$oldext= ms_newRectObj();<BR>&nbsp; 
$oldext-&gt;setextent($bounds[0],$bounds[1],$bounds[2],$bounds[3]);&nbsp; //the 
extent in latlong<BR><BR>&nbsp; $newextproj = ms_newRectObj();<BR>&nbsp; 
$newextproj = $oldext-&gt;project($latlon,$newproj);&nbsp; //the extent in 
Robinson<BR><BR>&nbsp; 
$map-&gt;setextent($newextproj-&gt;minx,$newextproj-&gt;miny,$newextproj-&gt;maxx,$newextproj-&gt;maxy);<BR></DIV>
<DIV>But now when I try to see the new map extents e.g.</DIV>
<DIV>echo "new ext minx = ".$newextproj-&gt;minx;<BR>I'm getting nothing.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Has something else changed with Mapserver4 / php_mapscript_40.so?</DIV>
<DIV>Can anyone give me any pointers?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks in advance.</DIV>
<DIV>D. Pagurek</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

--=_6A348794.D0B1EE85--



More information about the mapserver-users mailing list