[mapserver-users] showing a .map in a template.html

avin mohanza avin_ngky at yahoo.com
Tue Jul 9 07:49:10 PDT 2013


how can i input a .map file into html.
actually i have created a template and i already include the map.
but it shows nothing in browser..

this is my template file(is there something wrong in my templae file?)


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/transitional.dtd">
<html>
  <head>
    <title>MapServer Template Sample</title>
  </head>

  <body>
    MapServer Template Sample<br>

    
    <form method="GET" action="/cgi-bin/mapserv">

    
      <input type="hidden" name="map"
value="/var/www/arnsbergMS/arnsberg.map">
      <input type="hidden" name="imgext" value="7.474607 50.595419 8.763348
51.966222">
      <input type="hidden" name="imgxy" value="300 200">
      <input type="hidden" name="program" value="/cgi-bin/mapserv">
      <input type="hidden" name="htmlroot" value="/var/www">
      <input type="hidden" name="map_web"
value="/var/www/arnsbergMS/templatest.html">

      
      

      

        
        	
          
          <input type="image" name="img"
src="/var/www/arnsbergMS/arnsberg.png"
                 style="border:0;width:300;height:400">
          <br>
          
           <[scalebar]> 
        

        
        	
          
          *Map Controls*<br>
          Set your zoom option:<br>
          <select name="zoom" size="1">
            <option value="2" [zoom_2_select]> Zoom in 2 times
            <option value="1"  [zoom_1_select]> Recenter Map
            <option value="-2" [zoom_-2_select]> Zoom out 2 times
          </select>
          <br>

          
          *Legend*<br>
           <[legend]> <br><br><br><br>

          
         <input type="image" name="ref" src="[ref]"
                style="border:0;width:150;height:150">
        
      
      


    </form>

  </body>
</html>


and i lso insert a template line in my map file

    WEB
    IMAGEPATH '/tmp/'
    IMAGEURL '/tmp/'
    TEMPLATE '/var/www/arsnbergMS/templatest.html'

when i type this address in browser
localhost/cgi-bin/mapserv?map=/var/www/arnsbergMS/arnsberg.map
the template comes out but without map inside.

when i type this address in browser
localhost/cgi-bin/mapserv?map=/var/www/arnsbergMS/arnsberg.map&layers=all&mode=map
my map appears perfectly

how can i show my map in my template file?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/showing-a-map-in-a-template-html-tp5065078.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list