[mapserver-users] Problems with querymap
frauke.trurnit at gmx.de
frauke.trurnit at gmx.de
Tue Nov 26 06:38:25 PST 2002
Hello,
I try to use querymap, but have some problems with it.
When I press the button for the Query feature
the result is: msQueryByPoint(): Search returned no results. No matching
record(s) found.
Thanks for help
Frauke
mapfile (zoom_html.map):
NAME "Zomm_html"
STATUS ON
EXTENT -125.48 50.83 -65.75 23.48
#UNITS kilometers
SIZE 500 500
SHAPEPATH "/usr/frauke/map_daten/vektor/shape"
FONTSET "/usr/frauke/fonts/fonts.list"
IMAGECOLOR 230 230 230
IMAGETYPE JPEG
PROJECTION #?????
proj=longlat
ellps=clrk66
datum=NAD27
no_defs
END
WEB
#HEADER "./header.html"
FOOTER "./footer.html"
TEMPLATE "./zoom_html.html"
IMAGEPATH "/usr/local/httpd/htdocs/ms_temp/"
IMAGEURL "http://172.23.71.157/ms_temp/"
END
QUERYMAP
COLOR 255 0 0
SIZE 200 200
STATUS ON
STYLE HILITE
END
#Maßstab
----------------------------------------------------------------------
SCALEBAR
STATUS EMBED
POSITION ll
STYLE 0 #Stil 0:s/w Sektionen
SIZE 200 5
COLOR 0 0 0 #Farbe scalebar
OUTLINECOLOR 0 0 0 #Umrissfarbe für einzelne Intervalle
IMAGECOLOR 255 255 255 #Hintergrundfarbe für Bild, in dem scalebar ist
UNITS kilometers
INTERVALS 4 #Intervallanzahl auf Maßstab (default=4)
LABEL
SIZE small
COLOR 0 0 0 #Scalebarfarbe
END
END # Scalebar
# HTML
LEGENDE------------------------------------------------------------------
LEGEND #jeder Layer, der in Legende soll, benötigt CLASSITEM
STATUS ON
KEYSIZE 18 12
LABEL
TYPE TRUETYPE
FONT arial
COLOR 0 0 0
SIZE 12
ANTIALIAS TRUE #Kantenglättung
END
TEMPLATE "./legende.html"
END
# LAYER
DEFINITIONEN---------------------------------------------------------
LAYER
NAME "US-Staten"
TYPE POLYGON
STATUS DEFAULT
DATA "states"
CLASSITEM "State_name" #Spalte in dbf-Tabelle
CLASS #"Oregon-Class"
NAME "Oregon"
EXPRESSION "Oregon" #Name, der in der Spalte "State_name" vorkommt
OUTLINECOLOR 128 128 128
COLOR 31 31 255
END
CLASS #"Texas-Class"
NAME "Texas"
EXPRESSION "Texas"
OUTLINECOLOR 128 128 128
COLOR 255 255 255
END
CLASS #"alle-Class"
NAME "Staten"
EXPRESSION /./ #alle Zeichen
OUTLINECOLOR 128 128 128
COLOR 255 255 0
END
END
LAYER
NAME "US-Staten Beschriftung"
TYPE ANNOTATION #schrift
STATUS ON
DATA "states"
LABELITEM "State_name"
CLASSITEM "State_name" #Art der Beschriftung muss in Klasse festgelegt
werden
CLASS
LABEL
TYPE TRUETYPE
FONT "arial"
SIZE 10
COLOR 0 0 0
OUTLINECOLOR 255 255 255 #Schriftschatten
POSITION CC
PARTIALS FALSE #Überlagerung
MINDISTANCE 250
BUFFER 2
END
END
END
LAYER
NAME "highway"
TYPE LINE
STATUS ON
DATA "US_HIWAY_polyline"
CLASSITEM "Highway" #Spalte in dbf-Tabelle
CLASS #"Oregon-Class"
NAME "highway"
EXPRESSION /./ #Name, der in der Spalte "Highway" vorkommt = alle
OUTLINECOLOR 128 128 128
COLOR 255 0 225
END
END
LAYER
NAME "city"
TYPE POINT
STATUS ON
DATA "CITY_125_point"
CLASSITEM "City" #Spalte in dbf-Tabelle
CLASS #"City-Class"
NAME "city"
EXPRESSION /./ #Name, der in der Spalte "City" vorkommt = alle
COLOR 0 0 0
OUTLINECOLOR 0 0 0
END
END
END
template (zoom_html.html):
<html>
<head>
<title>MapServer 3.5 Tutorial</title>
</head>
<body>
<h3>Zoom controls - html-Legende</h3>
<p>
<form method="GET" action="/cgi-bin/mapserv">
<input type="hidden" name="map" value="/usr/frauke/html_map/zoom_html.map">
<!--<input type="hidden" name="imgext" value="-125.48000 50.83000 -65.75000
23.48000">-->
<input type="hidden" name="imgxy" value="[center]"> <input type="hidden"
name="imgext" value="[mapext]">
<input type="hidden" name="map" value="[map]">
<table border=1 cellpadding=3>
<tr>
<td align=center>
<input type="image" name="img" src="[img]" border="0">
</td>
<td valign=top>
<table>
<tr>
<td colspan=3>
<font size=+1 face=arial,helvetica>Map Controls</font>
<p>
<input type=radio name=zoomdir value=0 [zoomdir_0_check]
[zoomdir_0_select]> Pan
<br>
<input type=radio name=zoomdir value=1 [zoomdir_1_check]
[zoomdir_1_select]> Zoom In
<input type=radio name=zoomdir value=-1 [zoomdir_-1_check]
[zoomdir_-1_select]>Zoom Out
<p>
Zoom Size <input type=text name=zoomsize size=4 value=""> <!--text
= Eingabe-Schaltfläche / size = Größe des Eingabefeldes -->
<p>
</td>
</tr>
<tr>
<td colspan=3>
<font size=0 face=arial,helvetica><b>Queries</b></font>
<p>
<input type=radio name="mode" value="browse" checked> Browsen <br>
<input type=radio name="mode" value="query"> Anfragen<br>
<input type=radio name="mode" value="nquery"> mehrere Anfragen<br>
<p>
</td>
</tr>
<tr>
<td colspan=3>
<font face=arial,helvetica><b>Legende</b></font><br>
</td>
</tr>
<tr>
<td>
[legend]
</td>
</tr>
<tr>
<td colspan=3>
<center><input type="submit" name="submit" value="neu
zeichnen"></center> <br>
</td>
</tr>
<tr>
<td colspan=3>
<center><input type=button value="zurück"
onClick="history.back()"></center> <br>
</td>
</tr>
<tr>
<td colspan=3>
<center><a
href="http://www-dev.dds.ptv.de/cgi-bin/mapserv?map=/usr/frauke/html_map/zoom_html.map">default</a></center>
</td>
</tr>
<!--<tr>
<td colspan=3>
Maßstab<br>[scale]
</td>
</tr>-->
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
footer.html:
font size=+1 face=arial,helvetica><b>Query Map Examples</b></font>
<p>
<table cellpadding="3" cellspacing="0" border="0">
<tr><td><img border="2" name="img" src="[img]"></td>
<td><img border="2"
src="/cgi-bin/mapserv?map=[map]&queryfile=/ms_temp/zoom_html[id].qy[get_layers]&mode=map&size=200+150"></td></tr>
<tr><th align="center">standard querymap</th>
<th align="center">cached query</th></tr>
</table>
</body>
</html>
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
More information about the MapServer-users
mailing list