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

Debbie Pagurek pagurekd at agr.gc.ca
Tue Dec 16 13:17:51 PST 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>  </STRONG>Hi all,</DIV>
<DIV>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.</DIV>
<DIV> </DIV>
<DIV>This worked before:</DIV>
<DIV>  
$newproj=ms_newprojectionObj("proj=robin,lon_0=0,x_0=0,y_0=0");<BR>  
$latlon =  
ms_newprojectionObj("proj=longlat,ellps=GRS80,datum=NAD83,no_defs");<BR><BR>  
$oldext= ms_newRectObj();<BR>  
$oldext->setextent($bounds[0],$bounds[1],$bounds[2],$bounds[3]);  //the 
extent in latlong<BR><BR>  $newextproj = ms_newRectObj();<BR>  
$newextproj = $oldext->project($latlon,$newproj);  //the extent in 
Robinson<BR><BR>  
$map->setextent($newextproj->minx,$newextproj->miny,$newextproj->maxx,$newextproj->maxy);<BR></DIV>
<DIV>But now when I try to see the new map extents e.g.</DIV>
<DIV>echo "new ext minx = ".$newextproj->minx;<BR>I'm getting nothing.</DIV>
<DIV> </DIV>
<DIV>Has something else changed with Mapserver4 / php_mapscript_40.so?</DIV>
<DIV>Can anyone give me any pointers?</DIV>
<DIV> </DIV>
<DIV>Thanks in advance.</DIV>
<DIV>D. Pagurek</DIV>
<DIV> </DIV></BODY></HTML>

--=_6A348794.D0B1EE85--



More information about the MapServer-users mailing list