[Cartoweb-users] writing new plugin

Alexandre Saunier alexandre.saunier at camptocamp.com
Tue Mar 7 06:33:07 EST 2006


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


More information about the Cartoweb-users mailing list