Hello,

your plugin seems quite correct.

[EMAIL PROTECTED] wrote:
for some data and display them in a box. The results are a set of
coordinates and are displayed as clickble links, now if I click on one of
them I get the map to be recentered and some info to be displayed, but at
this point I miss the previous
results and the folder is changed to the default, so I should to click on my
folder plugin and reinsert the input string.

// my data structure to be stored
class ResultFromDataBase { public $CoordinatesFromDataBase = array();
}

// my plugin main class
class ClientRicercaPar extends ClientPlugin implements Sessionable,
GuiProvider, FilterProvider {

protected $ResultFromDataBase;
// implementation of sessionable interface
public function createSession(MapInfo $mapInfo, InitialMapState $initialMapState) { $this->ResultFromDataBase = new ResultFromDataBase(); $this->clearSession(); return;
    }

clearSession() and "return" are useless here.

public function saveSession() {
if (!$this->getConfig()->persistentQueries) { // Do not store selections $this->ResultFromDataBase->CoordinatesFromDataBase = array(); }

        return $this->ResultFromDataBase;
}

Do you actually have a "persistentQueries" parameter set to "true" in your config (in ricercaPar.ini, not in query.ini)? If not, your results list is emptied on every page. That might be the reason of your troubles?!

Alexandre
_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to