[Chameleon] map hyperlinked

Pierre Racine racine_pierre at hotmail.com
Thu Aug 25 15:23:05 EDT 2005


I did something similar by hacking drawmap.php with this function:

function setMyLineLayerData($oMapSession)
{
$layerobj = $oMapSession->oMap->getLayerByName("lineslayer");
$query = "geomline from (SELECT geomline,evorder,linedays,oid FROM a2_eventpointandline(".calcDistFromScale($oMapSession->oMap->scale).",".$_SESSION["sCharId"].")) AS new_table USING UNIQUE oid USING SRID=4269";
$layerobj->set("data", $query);
}

I call the function somewhere in

 /* ============================================================================
 * Re-instate the previous map state
 * ========================================================================= */
@$oMapSession->restoreState( $szCurrentState, $szMapName, $szMapPath );
if (isset($_SESSION["sCharId"]))
{
    setMyPointLayerData($oMapSession);
    setMySmallPointLayerData($oMapSession);
    setMyLineLayerData($oMapSession);
}

I set the SESSION variable in my .phtml file just before the CWCExecute:

if ( isset($_GET["charid"]) )
   $_SESSION['sCharId'] = $_GET["charid"];

$oApp->CWCExecute();
?>

Hope that help,

Pierre



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20050825/706971c7/attachment.html


More information about the Chameleon mailing list