I'm trying to create a function in mapscript to assign the value of the
extents of the reference map.
On execution the map hangs, indicating that there are no reference map
extents set.
However, at the bottom of this function when the values of the
reference map extents are echo'd they are fine.
Can anyone see what I am doing wrong here?????
Is there a call to another function in PMAPPER that is voiding my extents???
function setRefMapExtents()
{
$PM_MAP_FILE = $_SESSION['PM_MAP_FILE'];
$map = ms_newMapObj($PM_MAP_FILE );
$refmap = $map->reference;
if (isset($_SESSION['mapMaxExt'])) // this holds the extents of
my main map frame - I will use the same for the reference map extents
{
$refmapextent = $refmap->extent;
$me = $_SESSION['mapMaxExt'];
// $refmapextent = ms_newrectObj(); // don't need to create
new rec obj, as already have a handle on existing
$refmapextent->setextent($me["minx"],$me["miny"],$me["maxx"],$me["maxy"]);
}
$_SESSION['refmapextent'] = $refmapextent;
$initRefExtent2 = $refmap->extent; // check to see if the extent values
have changed
foreach(get_object_vars($initRefExtent2) as $prop=>$val) //spew out the
ref extent values so I can see them
{
echo '<p>'.$prop.'='.$val.'</p>';
};
} // END Function
--
Ouvry
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users