[Chameleon] Filtering (Postgis) layers using user input

Jos Bol info at bolwebdesign.com
Thu Aug 23 10:10:18 EDT 2007


Sorry if this mail reaches the list twice, the first mail seems to have bounced. To be sure it arrives, I'm sending it again and also with some changes.

Hi,

I have been playing around with chameleon for some time now and everything seems to work perfectly. Great work!  

My only doubt so far is about postgis layers. I have a postgis layer with several lines, a lot of them actually, and
would only like to display a selection of lines based on user input. I would like to make a dropdown/combobox
with some predefined values and a button. When selecting the value from the combobox and then pressing the
button it should use the selected value of the combox in a heavy* query and display the result (a bunch of lines) on the map. I have been able to get this to work in a normal mapscript application, but don't know how to aproach this, using chameleon.

I´ve read on the mailing list it's possible to manipulate the map in the initializer file. What would be the best way the do this? I assume I have to create a widget for this as well to allow user input. Does anyone have any examples for this or some hints on where to start?  

I already successfully managed to filter a layer based on parameters in the URL and then zoom in to the results of the filter, by messing around in the initializer file. I imagine that there must be a cleaner way to do it, right?

Thanks in advance!

Jos

* The query contains a pathfinding algorithm, so it would be nice if I would only have to execute the query when the user changes the selection
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20070823/7ac65d29/attachment.html


More information about the Chameleon mailing list