[Mapserver-users] Querying by attributes.

Marc Drouin marc.drouin at fondex.ca
Wed Jun 11 08:50:30 PDT 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>  NAME phill</FONT>

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

<BR><FONT SIZE=2>  PROJECTION</FONT>

<BR><FONT SIZE=2>  "init=epsg:4269"</FONT>

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

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

<BR><FONT SIZE=2>  TYPE POLYGON</FONT>

<BR><FONT SIZE=2>  STATUS ON</FONT>

<BR><FONT SIZE=2>  DATA phill</FONT>

<BR><FONT SIZE=2>  FILTERITEM BNAME</FONT>

<BR><FONT SIZE=2>  FILTER "%name%"</FONT>

<BR><FONT SIZE=2>  CLASS</FONT>

<BR><FONT SIZE=2>        NAME "Hill"</FONT>

<BR>        <FONT SIZE=2>TEMPLATE "hill.html"</FONT>

<BR><FONT SIZE=2>    OUTLINECOLOR 0 0 0 </FONT>

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

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

<BR><FONT SIZE=2>  HEADER "hill_header.html"</FONT>

<BR><FONT SIZE=2>  FOOTER "hill_footer.html"</FONT>

<BR><FONT SIZE=2>  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.  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.  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