[mapserver-users] turn off layers

Pericles S. Nacionales naci0002 at umn.edu
Wed Mar 12 13:54:31 EDT 2008


Janosch,

Try removing 'name="submit"' in the <input type="submit" ...> tag.  See 
what happens.

-Perry

Janosch.Skrobek at trier.de wrote:
> Hi everyone!
>
> I'm sure this is a really easy problem but I've been trying to find a
> solution for more than an hour now and I can't seem to get it working.
>
> I have got 3 Layers which are STATUS OFF in the mapfile. So when I load
> my Map in browse modus nothing is shown. When I check one of the
> checkboxes and click "refresh" the layer appears (and also shows up in
> the address-line of the browser). But when I uncheck it and refresh it
> just won't turn off. When the page has reloaded the variable is still in
> the address line and the checkbox is still checked ...
>
> Can anyone tell me what I'm doing wrong?
>
> I first load the map like this:
> http://localhost/cgi-bin/mapserv.exe?root=/atkis&program=/cgi-bin/mapser
> v.exe&map=/ms4w/apps/atkis/test1.map&mode=browse&zoom=1
>
> My form looks like this (its basically a copy of the tutorial 2.2 -
> template by Pericles S. Nacionales [in the tutorial it works just fine
> but not in my map :(]):
>
> <form name="mapserv" method="GET" action="[program]">
>
> <!-- HIDDEN MAPSERVER CGI VARIABLES -->
>     <input type="hidden" name="root" value="[root]" />
>     <input type="hidden" name="program" value="[program]" />
>     <input type="hidden" name="map" value="[map]" />
>     <input type="hidden" name="imgext" value="[mapext]" />
>     <input type="hidden" name="imgxy" value="[center]" />
>     <input type="hidden" name="layers" value="[layers]" />
>     <input type="hidden" name="zoom" value="[zoom]" />
> <table width="600" border="0" align="center">
>   <tr> 
>     <td>
> 	<table width="400" border="1" align="center">
> 	  <tr>
> 	    <td colspan="3">Select Layers:
> <!-- SPECIFY VECTOR LAYERS -->
> 	      <input type="checkbox" name="layer" value="nutz"
> [nutz_check]> Nutzfl&auml;chen&nbsp;
> 	      <input type="checkbox" name="layer" value="vegetation"
> [vegetation_check]> Wald &amp; Wasser &nbsp;
> 	      <input type="checkbox" name="layer" value="ausgleich"
> [ausgleich_check]>Ausgleichsfl&auml;chen<br>
>
> <!-- SPECIFY RASTER LAYERS -->
> 	      Select Background:
> 	      <select name="layer">
> 		<option value=" " [ _select]>No Background</option>
> 		<option value="dtk5g" [dtk5g_select]>
>                   DTK5 Grundriss
>                 </option>
> 	      </select>
> 	    </td>
> 	  </tr>
> 	  <tr>
> 	    <td>
>
> <!-- SPECIFY MAP MODE -->
> 	      <div align="center">Map Mode:<br>
> 		<select name="mode">
> 		  <option value="browse">Browse</option>
> 		  <option value="map">Map</option>
> 		</select>
> 	      </div>
> 	    </td>
> 	    <td>
> <!-- FORM SUBMIT BUTTON -->
> 	      <div align="center">
> 		<input type="submit" name="submit" value="Refresh">
> 	      </div>
> 	    </td>
> 	    <td>
> <!-- 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">
> 	      <input type="image" name="img" src="[img]" width="1024"
> height="768" border="0" />
> 	    </td>
> 	  </tr>
> 	</table>
>     </td>
>   </tr>
> </table>
> </form>
>
>
> Thank you for your help
>
> Janosch
>
> --------------------------------------------------------------------------------
>
> Diese E-Mail kann vertrauliche und/oder rechtlich geschützte Informationen enthalten. 
> Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, 
> informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte 
> Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet. Der 
> rechtsverbindliche elektronische Schriftverkehr mit der Stadt Trier ist über diese 
> E-Mail-Adresse derzeit noch nicht möglich.
>
> --------------------------------------------------------------------------------
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>   



More information about the mapserver-users mailing list