[mapserver-users] itemquery using dynamic expressions

Untung Rasidin urasidin at email.com
Wed Apr 17 04:41:38 EDT 2002


Hi all, I am new to mapserver.
I use mapserver3.5
With Reference to mail:
Subject: Re: point file filter 
From: "Stephen Lime" <steve.lime at dnr.state.mn.us> 
Date: Mon, 05 Feb 2001 09:28:22 -0600 


I am having problem with itemquery using dynamic expressions (from Mr.Steve Lime) in html form.
The problems are:
- the attribute QUERYMAP (in map file) have no influence, why? .So the result image just display an area/region 
  that was selected/queried and others region not shown. But I want to use QUERYMAP to display the  result of
  query in html template with hilite color.  
- the result of query (a field from dbf file)  not shown, noquery result.

here is my map fie:
NAME DEMO
STATUS ON
SIZE 600 600
#world94
EXTENT -194.32 120.82 194.32 -120.47
SHAPEPATH "data"
IMAGECOLOR 255 255 255

WEB
  TEMPLATE world.html
  IMAGEPATH "/var/www/html/tmp/"
  IMAGEURL "/tmp/"
END

QUERYMAP    #No influence ,why ?
SIZE 200 200
STATUS ON
COLOR 255 255  0
STYLE HILITE
END

LEGEND
  KEYSIZE 18 12
  LABEL
    TYPE BITMAP
    SIZE MEDIUM
    COLOR 0 0 89
  END
  STATUS ON
END
#
LAYER
  NAME world94
  TYPE POLYGON
  STATUS DEFAULT
  DATA world94
    CLASS
    OUTLINECOLOR 250 0 0
    END
  TEMPLATE "world.html"
END
END # LAYER world94
END # Map File

Here is my form:

<form method=GET action="/cgi-bin/mapserv" >
<input type="hidden" name="map" value="/var/www/html/ms_demo/baleendah/world2.map">
PICK A COUNTRY:<BR>
<SELECT name="map_world94_class_expression" SINGLE>
<option value="('[ABBREVNAME]' eq 'Vietnam' )"> Vietnam</option>
<option value="('[ABBREVNAME]' eq 'Indonesia')"> Indonesia</option>
<option value="('[ABBREVNAME]' eq 'China')"> Cina</option>
<option value="('[ABBREVNAME]' eq 'US')">USA</option>
</SELECT>
<input type="submit" value="GO!">
</form

HERE is my template result:

<TABLE BORDER=1>
<tr>
Version :[version]
</tr>
<tr><td>COUNTRY</td><td>AREA</td><td>LIFE EXPECTATION</td></tr><BR>
<tr><td>[ABBREVNAME] </td><td>[AREA]</td><TD>[LIFE_EXP]</TD></tr>
<tr><td><img border="2" src="[img]"></td></tr>
</TABLE>

Maybe some one can find what wrong with this?
Would you give me a simple axample of html form/map file for 'itemquery' please,please !



Thanks in advance 

Untung Rasidin 
Web Programmer
PT.Virtuon Technologies,Bandung,Indonesia
www.virtuontech.com 
-- 

_______________________________________________
Sign-up for your own FREE Personalized E-mail at Email.com
http://www.email.com/?sr=signup




More information about the mapserver-users mailing list