[fusion-users] Dynamic selection
Tom van der Putte
tom at vdputte.nl
Thu Oct 15 04:20:18 EDT 2009
BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
}Hello List,
I am currently in the process on grasping the PHP_Mapscript/Fusion
combination on a Mapserver/WinXP installation. Using the CookBook and
the source files, I have already managed to do some stuff, but I'm
kinda stuck at the moment.
For simplicity let's say I'm using a map with one layer, containing
point features, stored in a postgis table. What I want to do is select
these features based on a certain attribute/value combination (entered
by the user), display the feature info and additional info, and
highlight the features in the current map.
One issue is that the query to select features is done in two steps:
the first is a posGIS query (query 1). It uses the attribute/value
combination entered by the user to create a join; depending on the
attribute, a different join is created. (This is why I do not join in
the layers data directive.) The result (result1) contains the feature
ids, and additional info from the joined tables. This info is then
sent back to the widget and displayed in a resultPanel. So far so
good, and everything works.
However, I also want to highlight the features from result1 in the
current map. To do so, in the same php script, I ran a
queryByAttribute on the feature IDs to set the correct selection for
the current session, but I don't know how to send this selection back
to the widget. I have tried a mapscript drawQuery() and redraw in the
widget, but this doesn't work.
I'm a bit lost as to how I can either set the selection in the php
script, and somehow updating the map in the widget, or send the
selection back to the widget and set the selection from there. Could
anyone please assist me with this?
Thanks,
Tom van der Putte,
The Netherlands
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fusion-users/attachments/20091015/8e0c3f1b/attachment.html
More information about the fusion-users
mailing list