[Mapserver-users] selection hilite_ basic question

andre shue andiehumpy at hotmail.com
Thu May 27 10:58:05 EDT 2004


<html><div style='background-color:'><DIV class=RTE>
<DIV>Hi Steve and List, </DIV>
<DIV>I am pretty new and unexperienced to the MS, it might be a stupid quest... anyway, I got the demo running, changed some layers, but when selecting a polygon via itemquery I am not sure. I&nbsp;can do an attribut search and&nbsp;also get&nbsp;&nbsp;results via template&nbsp;[area] [name]&nbsp; yet no map. I know&nbsp;I&nbsp;can get a map via querymap, but could not go any further on this.&nbsp; &nbsp;</DIV>
<DIV>I dont&nbsp;know how to build up an template with a map,&nbsp; including the selected polygon marked and in the centre of the&nbsp;map....&nbsp;</DIV>
<DIV>&nbsp;As the where any examples I would be&nbsp;happy.</DIV>
<DIV>As you have any hints, please remember, I am a Geographer and low level programmer.</DIV>
<DIV>Thanks a lot.</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>Andreas </DIV>
<DIV>&nbsp;</DIV>
<DIV>PS. Another question is, is there a list of the complete template and map commands, I got the feeling there are some more commands, than I could find via the Mapserver homepage.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks anyway to the great developers of mapserver </DIV>
<DIV>&nbsp;</DIV>
<DIV>---------------------------------------------------------------------------------------------------------</DIV>
<DIV>Here is the template and the map.</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&lt;!-- START OF MAPSERVER FORM --&gt;<BR>&lt;form name="mapserv" method="GET" action="mapserv.exe"&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;table width="400" border="0" align="center"&gt;<BR>&nbsp; &lt;tr&gt; <BR>&nbsp;&nbsp;&nbsp; &lt;td&gt;<BR>&nbsp;&lt;p align="center"&gt;&lt;font face="Arial Narrow"&gt;&amp;nbsp; &lt;/font&gt; <BR>&nbsp;&nbsp;&nbsp; &lt;font face="Arial Narrow" size="6"&gt;Muldentalkreis MS <BR>&nbsp;&nbsp;&nbsp; Test&lt;/font&gt;&lt;/p&gt;<BR>&nbsp;&lt;p&gt;&amp;nbsp;&lt;/p&gt;<BR>&nbsp;&lt;table width="466" border="1"&gt;<BR>&nbsp;&nbsp; &lt;tr&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;td width="211"&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;!-- SPECIFY MAP MODE --&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Attribut eingeben&lt;b&gt; (Achtung!!! Mapmode = Attributabfrage)&lt;/b&gt;&lt;div align="center"&gt;<BR>&lt;input type="TEXT"&nbsp; size= "30" name= "qstring" value=""&gt;&lt;input type="submit" value="ENTER"&gt;&lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div align="center"&gt;&amp;nbsp;&lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div align="center"&gt;&amp;nbsp;&lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div align="center"&gt;Map Mode:&lt;br&gt;<BR>&nbsp;&nbsp;&lt;select name="mode"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;option value="browse" [browse_select]&gt;Browse&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;option value="query" [query_select]&gt;Abfrage&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value="itemquery" [itemquery_select]&gt;Attributabfrage&lt;/option&gt; <BR>&nbsp;<BR>&nbsp;&nbsp;&lt;/select&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;td width="77"&gt;<BR>&lt;!-- FORM SUBMIT BUTTON --&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div align="center"&gt;<BR>&nbsp;&nbsp;&lt;input type="submit" name="submit" value="Refresh"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;td width="156"&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&lt;!-- ZOOM/PAN CONTROLS --&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div align="center"&gt;Map Control: &lt;br&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;select name="zoom"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value="4" [zoom_4_select]&gt;Zoom In 4x&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value="3" [zoom_3_select]&gt;Zoom In 3x&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value="2" [zoom_2_select]&gt;Zoom In 2x&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value="1" [zoom_1_select]&gt;Recenter&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value="-2" [zoom_-2_select]&gt;Zoom Out 2x&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value="-3" [zoom_-3_select]&gt;Zoom Out 3x&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value="-4" [zoom_-4_select]&gt;Zoom Out 4x&lt;/option&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/select&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp; &lt;/tr&gt;<BR>&nbsp;&nbsp; &lt;tr&gt;<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; <BR>&lt;!-- DISPLAY THE MAPSERVER-CREATED MAP IMAGE --&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;td colspan="3" align="center" valign="top" width="390"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type="image" name="img" src="[img]" width="[mapwid
th]" height="[mapheight]"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&nbsp; &lt;/tr&gt;<BR>&nbsp;&lt;/table&gt;<BR>&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp; &lt;/tr&gt;<BR>&lt;/table&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;!-- Attributabfrage --&gt;<BR>&amp;nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&lt;!-- HIDDEN MAPSERVER CGI VARIABLES --&gt;<BR>&lt;input type="hidden" name="imgxy" value="[center]"&gt;<BR>&lt;input type="hidden" name="imgext" value="[mapext]"&gt;<BR>&lt;input type="hidden" name="map" value="[map]"&gt;<BR>&lt;input type="hidden" name="root" value="[root]"&gt;<BR>&lt;input type="hidden" name="savequery" value="true"&gt;<BR>&lt;input type="hidden" name="qlayer" value="mtl"&gt;<BR>&lt;input type="hidden" name="qitem" value="GEMEINDE"</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;/form&gt;<BR>&lt;/body&gt;<BR>&lt;/html&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;----------------------------------------------------------------------------------------------------------------</DIV>
<DIV>MAP<BR>&nbsp; IMAGETYPE PNG<BR>&nbsp; EXTENT 4528581.187561 5713247.167603 4573608.666901 5651344.554810<BR>&nbsp; SIZE 750 750<BR>&nbsp; SHAPEPATH "data"<BR>&nbsp; IMAGECOLOR 255 255 255</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>QUERYMAP<BR>&nbsp; SIZE 600 600<BR>&nbsp; STATUS OFF <BR>&nbsp; STYLE HILITE<BR>&nbsp; COLOR 23 35 24<BR>END</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>WEB<BR>&nbsp; TEMPLATE&nbsp; 'test.html'<BR>&nbsp; IMAGEPATH 'tmp/'<BR>&nbsp; IMAGEURL&nbsp; 'tmp/'<BR>END</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp;LAYER<BR>&nbsp; NAME mtl<BR>&nbsp; TYPE POLYGON<BR>&nbsp; DATA mtl<BR>&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp; proj=tmerc <BR>&nbsp;&nbsp;&nbsp; lat_0=0.000000000 <BR>&nbsp;&nbsp;&nbsp; lon_0=12.000000000 <BR>&nbsp;&nbsp;&nbsp; k=1.000000 <BR>&nbsp;&nbsp;&nbsp; x_0=4500000.000 <BR>&nbsp;&nbsp;&nbsp; y_0=0.000 <BR>&nbsp;&nbsp;&nbsp; ellps=bessel <BR>&nbsp;&nbsp;&nbsp; units=m <BR>&nbsp;&nbsp;&nbsp; no_defs <BR>END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#line114<BR>&nbsp; STATUS DEFAULT<BR>&nbsp; CLASSITEM 'GEMEINDE'<BR>&nbsp; LABELITEM 'GEMEINDE'<BR>&nbsp; #LABELMINSCALE 80000&nbsp;<BR>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; NAME "GEMEINDE"<BR>&nbsp;&nbsp;&nbsp; EXPRESSION&nbsp; /./<BR>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 0<BR>&nbsp;&nbsp;&nbsp; COLOR 255 255 217 <BR>&nbsp;&nbsp;&nbsp; LABEL<BR>END<BR>&nbsp; TEMPLATE "mtl.html"<BR>&nbsp; END<BR>&nbsp; HEADER "mtl_header.html"<BR>&nbsp; FOOTER "mtl_footer.html"</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>END<BR></DIV>
<DIV>---------------------------------------------------------------------------------------------------</DIV>
<P><BR><BR></P></DIV></div><br clear=all><hr>MSN 8 helps <a href="http://g.msn.com/8HMBEN/2752??PS=47575">ELIMINATE E-MAIL VIRUSES.</a> Get 2 months FREE*.</html>



More information about the mapserver-users mailing list