[mapserver-users] problem viewing map in browse mode

Richard MacNeill rmacneill at bushheritage.org.au
Sun Sep 18 22:34:57 PDT 2011


I have what is probably a simple request.

I have written two simple sets of code that should, so the examples say,
result in an internet map display with some basic tools. The intent is
to get the process working before generating further detail.

I am new to this medium, but just need to get beyond the initial basics.

Mapserver is installed and working on a linux server.

When I enter the call: 

http://[mysite]/cgi-bin/mapserv?MAP=bha_simple.map&LAYERS=ALL&MODE=map

I see the features of the map file (below).

However, when I enter the call:

http://[mysite]/cgi-bin/mapserv?MAP=bha_simple.map&LAYERS=ALL&MODE=brows
e

I see the basic tools and map window, but with a broken link (small
cross in box].

The html code is below (australia_reserves.html):

<!-- MapServer Template -->

<html>
  <head>
    <title>MapServer Template Sample</title>
  </head>

  <body>
    Testing Australia_reserves...<br>

    <!-- The central form the application is based on. -->
    <form method="GET" action="mapserv">

 <!-- The map -->
      <INPUT NAME="img" TYPE="image" SRC= "/cgi-bin/images/" width =
"300" height = "400" border = "0">

      <input type="hidden" name="imgext" value="111.34 -43.79 155.69
-10.17">
      <input type="hidden" name="imgxy" value="149 120">
      <input type="hidden" name="map" value="bha_simple.map">
      <input type="hidden" name="mapext" value="shape">

        <!-- Second column: Zoom direction, Legend and Reference -->

          <!-- Zoom direction -->
          <b>Map Controls</b><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>
      </form>
  </body>
</html>


The mapfile (bha_simple.map) below:

MAP

NAME BHA
IMAGETYPE 'png'
SIZE 400 300
#SYMBOLSET "symbols.txt"
EXTENT 146.7 -38 151.6 -34.3
UNITS dd

#
# Start of web interface definition
#
WEB
  TEMPLATE '/var/www/cgi-bin/australia_reserves.html'
  IMAGEPATH '/var/www/cgi-bin/images/'
  IMAGEURL '[bush heritage URL]'
END
#
# Start of layer definitions
#
  LAYER
    NAME "Highways"
    DATA '/var/www/cgi-bin/data/australia_highway.shp'
    TYPE line
    STATUS ON
    CLASS
      COLOR 0 0 0
    END
  END # Layer

END #MAP


Richard MacNeill
Spatial Information Coordinator
Bush Heritage Australia
PO Box 329 Flinders Lane, Melbourne Vic 8009
Level 5, 395 Collins Street, Melbourne Vic 3000
www.bushheritage.org.au

Part time (Monday to Wednesday)
T: +61(0)3 8610 9110
F: +61(0)3 8610 9199 




*****************



More information about the MapServer-users mailing list