[Mapserver-users] selection hilite_ basic question

Janeks Kamerovskis janeks.kamerovskis at silva.lv
Fri May 28 02:02:23 EDT 2004


I made working map example a bit modified to see my own maps.
(on Win2000 and IIS)
Then added to query layer definition:
TEMPLATE 'C:\bla\path\mapTemplate.html'
that was the same template, that I was using for that working exapmle.
Then by changing in url parameters &mode=itemquery
and adding
&qlayer=layername&qitem=atribFieldName&qstring=aquerystrng&mapext=shapes
It worked well.

Now I just have to add a search control in my map template file

brgds
Janeks

-----Original Message-----
From: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu]On Behalf Of andre shue
Sent: Thursday, May 27, 2004 5:58 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] selection hilite_ basic question


Hi Steve and List,
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 can do an attribut search and also
get  results via template [area] [name]  yet no map. I know I can get a map
via querymap, but could not go any further on this.
I dont know how to build up an template with a map,  including the selected
polygon marked and in the centre of the map....
 As the where any examples I would be happy.
As you have any hints, please remember, I am a Geographer and low level
programmer.
Thanks a lot.


Andreas

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.

Thanks anyway to the great developers of mapserver

----------------------------------------------------------------------------
-----------------------------
Here is the template and the map.


<!-- START OF MAPSERVER FORM -->
<form name="mapserv" method="GET" action="mapserv.exe">

<table width="400" border="0" align="center">
  <tr>
    <td>
 <p align="center"><font face="Arial Narrow">&nbsp; </font>
    <font face="Arial Narrow" size="6">Muldentalkreis MS
    Test</font></p>
 <p>&nbsp;</p>
 <table width="466" border="1">
   <tr>
     <td width="211">

<!-- SPECIFY MAP MODE -->
       Attribut eingeben<b> (Achtung!!! Mapmode = Attributabfrage)</b><div
align="center">
<input type="TEXT"  size= "30" name= "qstring" value=""><input type="submit"
value="ENTER"></div>
       <div align="center">&nbsp;</div>
       <div align="center">&nbsp;</div>
       <div align="center">Map Mode:<br>
  <select name="mode">
    <option value="browse" [browse_select]>Browse</option>
    <option value="query" [query_select]>Abfrage</option>
     <option value="itemquery" [itemquery_select]>Attributabfrage</option>

  </select>
       </div>! ;
     </td>
     <td width="77">
<!-- FORM SUBMIT BUTTON -->
       <div align="center">
  <input type="submit" name="submit" value="Refresh">
       </div>
     </td>
     <td width="156">




<!-- ZOOM/PAN CONTROLS -->
       <div align="center">Map Control: <br>
                <select name="zoom">
                  <option value="4" [zoom_4_select]>Zoom In 4x</option>
                  <option value="3" [zoom_3_select]>Zoom In 3x</option>
                  <option value="2" [zoom_2_select]>Zoom In 2x</option>
                  <option value="1" [zoom_1_select]>Recenter</option>
        ! ;          <option value="-2" [zoom_-2_select]>Zoom Out
2x</option>
                  <option value="-3" [zoom_-3_select]>Zoom Out 3x</option>
                  <option value="-4" [zoom_-4_select]>Zoom Out 4x</option>
                </select>
              </div>
     </td>
   </tr>
   <tr>


<!-- DISPLAY THE MAPSERVER-CREATED MAP IMAGE -->
     <td colspan="3" align="center" valign="top" width="390">
    &nb! sp;  <input type="image" name="img" src="[img]" width="[mapwid th]"
height="[mapheight]">
     </td>
   </tr>
 </table>
   </td>
  </tr>
</table>

<!-- Attributabfrage -->
&nbsp;


<!-- HIDDEN MAPSERVER CGI VARIABLES -->
<input type="hidden" name="imgxy" value="[center]">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="root" value="[root]">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="qlayer" value="mtl">
<input type="hidden" name="qitem" value="GEMEINDE"



</form>
</body>
</html>

 ---------------------------------------------------------------------------
-------------------------------------
MAP
  IMAGETYPE PNG
  EXTENT 4528581.187561 5713247.167603 4573608.666901 5651344.554810
  SIZE 750 750
  SHAPEPATH "data"
  IMAGECOLOR 255 255 255


QUERYMAP
  SIZE 600 600
  STATUS OFF
  STYLE HILITE
  COLOR 23 35 24
END



WEB
  TEMPLATE  'test.html'
  IMAGEPATH 'tmp/'
  IMAGEURL  'tmp/'
END


 LAYER
  NAME mtl
  TYPE POLYGON
  DATA mtl
  PROJECTION
    proj=tmerc
    lat_0=0.000000000
    lon_0=12.000000000
    k=1.000000
    x_0=4500000.000
    y_0=0.000
    ellps=bessel
    units=m
    no_defs
END        #line114
  STATUS DEFAULT
  CLASSITEM 'GEMEINDE'
  LABELITEM 'GEMEINDE'
  #LABELMINSCALE 80000
  CLASS
    NAME "GEMEINDE"
    EXPRESSION  /./
    OUTLINECOLOR 0 0 0
    COLOR 255 255 217
    LABEL
END
  TEMPLATE "mtl.html"
  END
  HEADER "mtl_header.html"
  FOOTER "mtl_footer.html"


END

----------------------------------------------------------------------------
-----------------------






MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*.
_______________________________________________ Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list