chameleon legends and query results

Mark Hudson Mark.Hudson at XWAVE.COM
Fri Feb 3 15:04:04 EST 2006


Hi:



I have a chameleon application and am wondering how to manipulate the
legend and query results.  My legend is including every layer in my
mapfile – but I want to remove a couple of layers from it (layers that
represent street borders) – not sure how to remove items (layers) from the
legend.  Any suggestions?



Secondly, I can get the query results to display for my chosen layer
(crime) by implementing the TEMPLATE object in the mapfile.  However, it
does not appear to be reading the template file correctly.  I have
specified a TEMPLATE, HEADER, AND FOOTER object in the crime layer but my
TEMPLATE html file specifies chosen fields that should be displayed.  The
problem is that every field in the shapefile is being shown in the query
results.  The application does not appear to be reading the template files
correctly, but does not work if I do not specify any templates.  Code is
below:



Mapfile layer object code:

#layer

  LAYER

    NAME "Crime Locations"

    STATUS ON

    DATA "geocode_crime_84"

    TYPE POINT

    MAXSCALE 100000

    TOLERANCE 10

    CLASS

      STYLE

        SYMBOL 'triangle'

        COLOR 255 0 0

        MINSIZE 8

      END

      TEMPLATE "../templates/crime_query.html"

    END

    HEADER "../templates/crime_header.html"

    FOOTER "../templates/crime_footer.html"



  END



Crime_query.html code:

<tr>

  <td>[lrn]</td>

  <td>[OFFENCE]</td>

  <td>[MODE_TRAVE]</td>

  <td>[LOCATION]</td>

  <td>[TIME]</td>

  <td>[DAY]</td>

  <td>[DATE_]</td>

  <td>[MONTH]</td>

  <td>[WEAPON_USE]</td>

</tr>



Crime_header.html code:

  <b>Layer: crime</b>

<p>

<table cellpadding=5 cellspacing=2 border=0>

  <tr bgcolor=#CCCCCC>

    <td bgcolor=#ffffff> </td>

    <th>OFFENCE</th>

    <th>MODE_TRAVE</th>

    <th>LOCATION</th>

    <th>TIME</th>

    <th>DAY</th>

    <th>DATE_</th>

    <th>MONTH</th>

    <th>WEAPON_USE</th>

  </tr>



Crime_footer.html code:

</table>

<p>





Any suggestions would be helpful.  Thanks.



Mark.



More information about the mapserver-users mailing list