[Mapserver-users] Querying by attributes.

Marc Drouin marc.drouin at fondex.ca
Wed Jun 11 11:50:30 EDT 2003


This is a multi-part message in MIME format.

--Boundary_(ID_++eXhzkHHGDG8fMvmZ6JKg)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

Hi group,

I'm trying to set a simple query application where a user selects an
attribute from a drop down list and mapserver brings up an image where we
can see the desired object, in my case, polygons representing buildings.

The drop down list contains the name of the buildings, hence BNAME.

Here is the section of the mapfile:

LAYER
  NAME phill

  PROJECTION
  "init=epsg:4269"
  END

  TYPE POLYGON
  STATUS ON
  DATA phill
  FILTERITEM BNAME
  FILTER "%name%"
  CLASS
  	NAME "Hill"
	TEMPLATE "hill.html"
    OUTLINECOLOR 0 0 0
    COLOR  34 170 221
  END
  HEADER "hill_header.html"
  FOOTER "hill_footer.html"
  TOLERANCE 5
END

What happens in the application, we can see all the layers that are STATUS
ON, except the layer of the buildings that I want to query.  However, if I
select a building name from the list, I generates a report eventhough they
are not presente in the initial view of the map.

If we comment out the line FILTERITEM, everything works fine.

Can someone explain why this happens.  Can someone explain the
relationship/difference between FILTERITEM and FILTER.

Thank you

Marc

--Boundary_(ID_++eXhzkHHGDG8fMvmZ6JKg)
Content-type: text/html; charset=iso-8859-1
Content-transfer-encoding: 7BIT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>Querying by attributes.</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi group,</FONT>
</P>

<P><FONT SIZE=2>I'm trying to set a simple query application where a user selects an attribute from a drop down list and mapserver brings up an image where we can see the desired object, in my case, polygons representing buildings.</FONT></P>

<P><FONT SIZE=2>The drop down list contains the name of the buildings, hence BNAME.</FONT>
</P>

<P><FONT SIZE=2>Here is the section of the mapfile:</FONT>
</P>

<P><FONT SIZE=2>LAYER</FONT>

<BR><FONT SIZE=2>&nbsp; NAME phill</FONT>

<BR><FONT SIZE=2>&nbsp; </FONT>

<BR><FONT SIZE=2>&nbsp; PROJECTION</FONT>

<BR><FONT SIZE=2>&nbsp; &quot;init=epsg:4269&quot;</FONT>

<BR><FONT SIZE=2>&nbsp; END</FONT>

<BR><FONT SIZE=2>&nbsp; </FONT>

<BR><FONT SIZE=2>&nbsp; TYPE POLYGON</FONT>

<BR><FONT SIZE=2>&nbsp; STATUS ON</FONT>

<BR><FONT SIZE=2>&nbsp; DATA phill</FONT>

<BR><FONT SIZE=2>&nbsp; FILTERITEM BNAME</FONT>

<BR><FONT SIZE=2>&nbsp; FILTER &quot;%name%&quot;</FONT>

<BR><FONT SIZE=2>&nbsp; CLASS</FONT>

<BR><FONT SIZE=2>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME &quot;Hill&quot;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>TEMPLATE &quot;hill.html&quot;</FONT>

<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 0 </FONT>

<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; COLOR&nbsp; 34 170 221</FONT>

<BR><FONT SIZE=2>&nbsp; END</FONT>

<BR><FONT SIZE=2>&nbsp; HEADER &quot;hill_header.html&quot;</FONT>

<BR><FONT SIZE=2>&nbsp; FOOTER &quot;hill_footer.html&quot;</FONT>

<BR><FONT SIZE=2>&nbsp; TOLERANCE 5</FONT>

<BR><FONT SIZE=2>END</FONT>
</P>

<P><FONT SIZE=2>What happens in the application, we can see all the layers that are STATUS ON, except the layer of the buildings that I want to query.&nbsp; However, if I select a building name from the list, I generates a report eventhough they are not presente in the initial view of the map.</FONT></P>

<P><FONT SIZE=2>If we comment out the line FILTERITEM, everything works fine.</FONT>
</P>

<P><FONT SIZE=2>Can someone explain why this happens.&nbsp; Can someone explain the relationship/difference between FILTERITEM and FILTER.</FONT>
</P>

<P><FONT SIZE=2>Thank you</FONT>
</P>

<P><FONT SIZE=2>Marc</FONT>
</P>

</BODY>
</HTML>

--Boundary_(ID_++eXhzkHHGDG8fMvmZ6JKg)--



More information about the mapserver-users mailing list