[Cartoweb-users] writing new plugin

giuseppe.derossi at email.it giuseppe.derossi at email.it
Wed Mar 8 09:24:14 EST 2006



Hi Alexander,
I'm studing the sessionable plugins such as Outline and Edit. As for as I've
understood, I've to do:
1) creating a class which is my state : the set of variables, arrays and so
on I want to store
2) making the my new plugin sessionable by inserting this interface
3) writing the methods you indicated : in createSession I have to set the
defined state-object while the loadSession and saveSession are the get and
set  methods

at this point I 've a doubt :
 can I manage the input and output of my state-object according my needs, by
setting and getting data to and from my state-object ?
do I need a server plugin for that ?

thanks and regards



	--------- Original Message --------
	Da: Alexandre Saunier <alexandre.saunier at camptocamp.com>
	To: 
	        Cc: cartoweb-users at lists.maptools.org
	Oggetto: Re: [Cartoweb-users] writing new plugin
	Data: 07/03/06 12:33
	
	> 
> 
> Hello,
> 
> giuseppe.derossi at email.it wrote:
> > My plugin is now quite ready: I can read the user's input who looks for 
> > a buillding, by inserting a name such as 'hospital', 'church' and so 
> > on... my plug  gathers the data and, in the same folder,  displays a 
> > list of results from the db. Now the user, by clicking one of them (if 
> > there are) makes the map to be recentered. I've used the 
> > recenter_bbox=x1,y1,x2,y2 in the links.
> > This way works but there is an issue: after the right recentering , the 
> > main folrder (themes) is opened and if I come back to my new forlder I 
> > 've lost the results; beyond of that.
> 
> Make your plugin implement the interface Sessionable . This interface 
> allows your plugin to use methods createSession(), loadSession(), 
> saveSession(), useful to save and retrieve data between 2 pages.
> 
> > Second , I'd like to diplay a long text of info about the building if 
> > there is, in this case I'd like to see it  under the map, 
> 
> Add a specific Smarty variable under the map in cartoclient.tpl and have 
> this variable assigned in your plugin renderForm()...
> 
> AS
>  
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Prestiti e Finanziamenti con un semplice click, scopri subito se sei
finanziabile cliccando qui
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2910&d=20060308




More information about the Cartoweb-users mailing list