[Mapserver-users] PROBLEM WITH CLASS EXPRESSION CONNECTED WITH SHPMID
Tomasz Wlazłowski
wlazlowski at igpik.waw.pl
Mon Jun 7 04:04:06 PDT 2004
This is a multi-part message in MIME format.
--------------090105040200070901020003
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
HELLO MAPSERVER USERS!
What I try to do is center to the selected feature in current map
extent. How can I zoom to selected feature (features). I know that I
should use some syntax with [shpmid] but I DON'T KNOW HOW TO DO THIS.
PLEASE HELP ME to dissolve my little problem ?
In my map file I have "doubled shapefile":
LAYER
NAME PLOT
DATA Cataster
STATUS ON
TYPE polygon
LABELITEM "NUMER"
LABELMAXSCALE 5000
TRANSPARENCY 10
CLASSITEM "NUMER"
CLASS
COLOR 245 245 220
OUTLINECOLOR 0 0 0
TEMPLATE "dzialki.html"
LABEL
COLOR 0 0 0
TYPE BITMAP
FONT arial-bold
SIZE SMALL
ANTIALIAS TRUE
POSITION CC
PARTIALS FALSE
MINDISTANCE 250
BUFFER 4
END
END
HEADER "dzialki_header.html"
FOOTER "dzialki_footer.html"
END
#------------------------------------------------------
LAYER # Query
NAME QPLOT
DATA Cataster
STATUS OFF
TYPE polygon
CLASSITEM "NUMER"
CLASS
# EXPRESSION ([NUMER] eq [value])
COLOR 255 50 10
OUTLINECOLOR 0 0 0
END
END
In my html file I use this syntax:
<input type="hidden" name="layer" value="Qdzialki">
<input type="hidden" name="map_Qdzialki_class_expression" value="[NUMER]">
<input type="text" name="map_Qdzialki_class_expression" size="5"
maxsize="9" value="">
and it's work fine. If I put some number in txtbox I get in the map
window selected feature. But I ask one more time:
DOES ANYBODY KNOW HOW TO ZOOM TO THIS(THOSE) SELECTED FEATURES?????
--------------090105040200070901020003
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-2">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<font size="2">HELLO
MAPSERVER USERS!</font>
<p lang="en-US" style="margin-bottom: 0cm;"><font size="2">What I try
to
do is center to the selected feature in current map extent. How can I
zoom to selected feature (features). I know that I should use some
syntax with [shpmid] but I DON’T KNOW HOW TO DO THIS.</font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><br>
</p>
<p style="margin-bottom: 0cm;"><font size="2"><span lang="en-US">PLEASE
HELP ME to dissolve my little problem <font face="Wingdings"></font></span></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font size="2">In my map
file I have “doubled shapefile”:</font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">LAYER
</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2">NAME
PLOT</font></font></p>
<h1 lang="en-US" class="western"><font color="#ff0000"> <font size="2">DATA
Cataster</font></font></h1>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2">STATUS
ON</font></font></p>
<p style="margin-bottom: 0cm;"> <font size="2"><font
face="Courier New, monospace"><span lang="de-DE">TYPE
polygon</span></font></font></p>
<p lang="de-DE" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> LABELITEM "NUMER"</font></font></p>
<p style="margin-bottom: 0cm;"><font size="2"><font
face="Courier New, monospace"><span lang="de-DE"> </span><span
lang="en-US">LABELMAXSCALE 5000</span></font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> TRANSPARENCY 10</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> CLASSITEM "NUMER"</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2">CLASS </font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> COLOR 245 245 220</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> OUTLINECOLOR 0 0 0</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2">TEMPLATE
"dzialki.html"</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> LABEL</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> COLOR
0 0 0</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> TYPE BITMAP</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> FONT
arial-bold</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> SIZE
SMALL</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> ANTIALIAS
TRUE</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> POSITION
CC</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> PARTIALS
FALSE</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> MINDISTANCE
250</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"> BUFFER
4</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><br>
</p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">END</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">END</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">HEADER
"dzialki_header.html"</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">FOOTER
"dzialki_footer.html"</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">END</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">#------------------------------------------------------</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">LAYER
# Query</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2">NAME
QPLOT</font></font></p>
<p style="margin-bottom: 0cm;"> <font size="2"><span lang="en-US"><font
face="Courier New, monospace"><b><font color="#ff0000">DATA
Cataster</font></b></font></span></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2">STATUS
OFF</font></font></p>
<p style="margin-bottom: 0cm;"> <font size="2"><font
face="Courier New, monospace"><span lang="de-DE">TYPE
polygon</span></font></font></p>
<p style="margin-bottom: 0cm;"><font size="2"><font
face="Courier New, monospace"><span lang="de-DE"> </span><span
lang="en-US">CLASSITEM "NUMER"</span></font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2">CLASS </font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2"># EXPRESSION ([NUMER] eq
[value])</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2">COLOR
255 50 10</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2">OUTLINECOLOR
0 0 0</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"> <font
face="Courier New, monospace"><font size="2">END</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">END</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><br>
</p>
<font size="2">In my html
file I use this syntax:</font>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"><input
type="hidden" name="layer" value="Qdzialki"></font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"><input
type="hidden" name="map_Qdzialki_class_expression"
value="[NUMER]"></font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2"><input
type="text" name="map_Qdzialki_class_expression"
size="5" maxsize="9" value=""></font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">and
it’s work fine. If I put some number in txtbox I get in the map
window selected feature. But I ask one more time:</font></font></p>
<p lang="en-US" style="margin-bottom: 0cm;"><font
face="Courier New, monospace"><font size="2">DOES
ANYBODY KNOW HOW TO ZOOM TO THIS(THOSE) SELECTED FEATURES?????</font></font></p>
</body>
</html>
--------------090105040200070901020003--
More information about the MapServer-users
mailing list