[mapserver-users] DBF Queries

Pushkar Pradhan pushkar at ERC.MsState.Edu
Thu Feb 7 11:34:11 PST 2002


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>[RNUM]
</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><th>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