[mapserver-users] PHP and itemquery

Stefano Bonnin shpr at libero.it
Wed Jun 19 06:47:06 PDT 2002


I'm trying to perform an itemquery with PHP.

My query layer defined in the map file is the following:

LAYER
  NAME ComuniQ2
  DATA AdminBndyB
  STATUS OFF
  TYPE POLYGON
  LABELITEM "POLY_NM"
  CLASS
     COLOR 225 225 225
     OUTLINECOLOR 0 0 0
     LABEL
        MINSIZE 5
        MAXSIZE 18
        POSITION AUTO
        ANGLE AUTO
        PARTIALS false
        MINDISTANCE 600
        COLOR 0 255 0
        BACKGROUNDSHADOWCOLOR 128 128 128
        TYPE TRUETYPE
   FONT arial
        ANTIALIAS true
      END
      TEMPLATE market.html
  END
END

and in the php file I have written somethig like:

$value="my value"

if ($querytype == "2") {
  $value = $HTTP_FORM_VARS["name"];
  $layer = $gpoMap->getlayerbyname($qlayer);
  $class=$layer->getclass(0);
  $layer->set("filteritem","POLY_NM");
  $layer->setFilter("'$value'");
  $class->set("color", $red);
  $img = $gpoMap->draw();

but mapserver seems to redraw the same map as before instead of draw the new
map with "the object  $value".

Some idea?

Thanks.




---
Outgoing mail is certified Virus Free. (FLASHH!)
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.371 / Virus Database: 206 - Release Date: 13/06/02




More information about the MapServer-users mailing list