linked tables and spatial queries

Micha Silver micha at ARAVA.CO.IL
Sun Jul 29 09:23:01 EDT 2007


On Thu, 28 Jun 2007 18:50:47 -0700, Dylan Beaudette
<dylan.beaudette at GMAIL.COM> wrote:
>
>I was in need of this type of functionality, and found it through two methods:
>
>1. define a query template in your mapfile, and have it redirect the user to a
>PHP page which can do related DB lookups and presentation. You can pass along
>mapserver query results on the URL.
>
>2. use something like ka-map and adjust how the query system displays the
>results in the left-hand side panel. I modified the query functions such that
>all searching and presentation was done via postgres+PHP.
>
>let me know if you need the details.
>

Hi Dylan:

I'm working on a new site (displaying water quality for farmers around our
region). I've got the mapserver / *.map file set up OK. I've installed
ka-map for it's well designed interface. And the layers display as I expect.
But I'm stuck with getting the results from spatial queries...

My layers are in postgis, and as per your previous post on the list, I've
split all the layers into two GROUPs, with one group of layers all set as
"queryable" "true" in the mapfile. I've also got a simple html file as a
template for each layer to show the data. Each html template file looks
something like:
       Well name: [name]
    <li> Drill Depth = [drill_dept]
    <li> Aquifer =  [aquifer_name]
    <li> Elevation =  [elevation]
where each item in [] is a column in the postgis table.

When I use the query button in the ka-map interface, what I get back (in the
left panel) is :

Layer Name:
Wells
results: 1

So it looks like the querying is working in general, just not retrieving the
columns of data. Can you give me any pointers? I'd be glad to try to rewrite
the map_query.php stuff in ka-map if necessary, but what should that script
do exactly? The option to just write a query template in php is tempting but
ka-map seems to be ignoring that TEMPLATE file.
 
Excuse the long post. Any tips will be most appreciated.
Regards,
Micha

>cheers,
>
>dylan
>
>
>--
>Dylan Beaudette
>Soils and Biogeochemistry Graduate Group
>University of California at Davis
>530.754.7341



More information about the mapserver-users mailing list