how to pass parameters to the mapFish component from a selectBox

12 views
Skip to first unread message

sylvain tacquet

unread,
Jul 27, 2010, 10:54:16 AM7/27/10
to geobi
Hello,

I am using GeoBi in a Pentaho dashboard and facing the following
problem :
- I would like the map to display specific regions depending on the
value selected in another selectBox.

I already know how to launch the map only when a value in the
selectBox is selected (adding a listener to the mapFish component) but
I don't know how to use this parameter (the value of the selectBox) to
customize the Map ("parameters" is already used in the mapFish
component) .

Do you have any idea how I could proceed ?

Thanks in advance !

Sylvain

Fabio D'Ovidio

unread,
Jul 28, 2010, 3:55:00 AM7/28/10
to ge...@googlegroups.com
Hello Sylvain,
If i understand what you mean, you have the following ways:

1. you must create different xactions and associate them separately
to your map by using the ID (so you will have several maps). The
Geo Server will filter (trougth a WFS request) the cartographic
features by using the ID and the WebGIS client will display only
the features you are interestes in

2. you can use a new mapfish component in your template.html like that:

regionSelector =
{
name: "regionSelector",
type: "select",
listeners: .....
solution: .......,
path: ........,
action: "regions.xaction",
parameters: [["param1","param1"]],
valueAsId: false,
parameter: .........,
htmlObject: .........,
executeAtStart: false,
tooltip: "Regions",

postChange: function(){

//configure an xaction to retreive your regions WKT geometries
by passing some parameters
regions = pentahoAction(regionSelector.solution,
regionsSelector.path,
"getRegionWkt.xaction",
[["param1", param1],["param2", param2],
.....],
null);

//Here you must write the code to update your map in order to
display the Wkt geometries, e.g. trougth new OpenLayers.Format.WKT()

}

};


Hope this help

Fabio


sylvain tacquet ha scritto:

--
*Ing. Fabio D'Ovidio*
/Location Intelligence Unit Manager/

Mail
f.do...@inovaos.it <mailto:f.do...@inovaos.it>
GMail
fabiod...@gmail.com <mailto:fabiod...@gmail.com>
Skype
dovidio_fa <skype:dovidio_fa?add>
Web
www.inovaos.it <http://www.inovaos.it/>
Blog
www.geobi.org <http://www.geobi.org/>




Inova Spa <http://www.inovaos.it/>
* *
*INOVA S.P.A.*

viale Casiraghi, 359
20099 Sesto S.Giovanni (MI)
via A. Nobel, 281
81031 Aversa (CE)
Tel. (Naples): +39 081 197 57 600
Tel. (Milan): +39 02 241 34 41
Fax. +39 081 020 25 75

sylvain tacquet

unread,
Jul 28, 2010, 5:31:09 AM7/28/10
to geobi
Thanks for your fast reply, I am trying this !

Sylvain
> f.dovi...@inovaos.it <mailto:f.dovi...@inovaos.it>
> GMail
> fabiodovi...@gmail.com <mailto:fabiodovi...@gmail.com>
> Skype
> dovidio_fa <skype:dovidio_fa?add>
> Webwww.inovaos.it<http://www.inovaos.it/>
> Blogwww.geobi.org<http://www.geobi.org/>
Reply all
Reply to author
Forward
0 new messages