[Chameleon] ClearPoints bugs
Massimiliano Cannata
massimiliano.cannata at supsi.ch
Tue Dec 20 08:18:59 EST 2005
I found that in chameleon-2.0 the widget ClearPoints doesn't work.
here the corrections that make it works for me:
I change the PerseURL function....
function ParseURL()
{
parent::ParseURL();
if ($this->isVarSet("CLEAR_POINTS") &&
$this->getVar("CLEAR_POINTS") == "1")
{
$oMap = $this->moMapObject->oMap;
$oLayer = @$oMap->getlayerbyname("MapNotesAnnotation");
//doesn't work with "cwc_tmp_point"
// First step, clearr all point from shape file
if (file_exists($oLayer->data.".dbf")) //doesn't work with
$_SESSION['gszTmpPath'].session_id().".dbf"
{
unlink($oLayer->data.".dbf");
}
// Then, clear point layer from current map file
if ($oLayer !== false)
{
$oLayer->set("status", MS_DELETE);
$_SESSION["gszCurrentState"] =
$this->moMapObject->saveState();
}
}
// return success
return true;
}
More information about the Chameleon
mailing list