[mapserver-users] DBF Queries
Francisco Delgado
delgadof at marn.gob.sv
Thu Feb 7 15:18:14 PST 2002
Yes, it has changed. Now both TEMPLATE, HEADER and FOOTER definitions go
inside the QUERY object of each LAYER object, but I think what Fran is
trying to do is to query a database that gets some records with
Latitude/Longitud data within the returned fields and plot them over an
existing map. Could somebody tell us (I want to do the same) how to do that?
Atentamente,
------------------------------------------------
Francisco Jose Delgado - Director de Informatica MARN
http://www.marn.gob.sv
delgadof at marn.gob.sv
-----Mensaje original-----
De: owner-mapserver-users at lists.gis.umn.edu
[mailto:owner-mapserver-users at lists.gis.umn.edu]En nombre de Pushkar
Pradhan
Enviado el: Thursday, February 07, 2002 1:34 PM
Para: Francisco
CC: mapserver-users at lists.gis.umn.edu
Asunto: Re: [mapserver-users] DBF Queries
Hi,
I am giving you an example from MS 3.3 I don't know whether it is changed,
but you will get an idea of a simple query.
QUERYMAP
SIZE 200 200
STATUS ON
STYLE HILITE
COLOR 255 0 0
END
This will enable query for only this layer:
LAYER
NAME majr
TYPE LINE
STATUS ON
DATA majr
CLASS
NAME "Major Rivers"
COLOR 0 0 255
END
HEADER "majr_header.html"
FOOTER "majr_footer.html"
QUERY
TEMPLATE "majr.html"
END
TOLERANCE 5
END # end of layer object - major rivers
The majr.html is the main file here which contains attrib. from your
.dbf file:
<tr><td>[LENGTH]</td><td>[MAJR_]</td><td>[MAJR_ID]</td><td>[NAME]</td><td>[R
NUM]
</td></tr>
length, name etc.. are attribs. from the dbf file.
_header.html: (only for html presentation)
<font size+1><b>Layer: majr</b></font><p>
<table cellpadding=5 cellspacing=2 border=0>
<tr
bgcolor=#CCCCCC><th>LENGTH</th><th>MAJR_</th><th>MAJR_ID</th><th>NAME</th><t
h>RNUM</th></tr>
The footer is simply html decoration:
</table><p>
>
> Hello all.
>
> First of all, thank you for your help with the Angle labels.
>
> Now, I'm looking for documentation or examples about queries to DBF files.
> I use ArcView files (Shp, DBF, Shx) and i would like to show some points
> from a query in a map.
> Someone know where I can find something about it?.
>
>
> Thank you,
>
> Regards!
> Fran.
>
>
----------------------------------------------------------------------------
--
PUSHKAR S. PRADHAN
Research Assistant
MISSISSIPPI STATE UNIVERSITY,
STARKVILLE, MS 39759.
Engineering Research Center
Box 9627
Mississippi State, MS 39762-9627
----------------------------------------------------------------------------
--
More information about the MapServer-users
mailing list