still not getting to the interactive html

SUBSCRIBE MAPSERVER-USERS mapuser map.user at YAHOO.COM
Mon Jan 14 09:00:41 EST 2008


hi, 
i am still not getting onto the interactive map, Example1-9.html of 
tutorial, link is:

http://biometry.gis.umn.edu/cgi-bin/mapserv.exe?
map=/ms4w/apps/tutorial/htdocs/example1-
9.map&layer=states&layer=modis

i have checked the "imagepath" and "imageurl" for mapfile. i can get 
the image file if i use a static map with mode set to "browse" at the 
specified location 

in "imagepath". i think there is something wrong with the "imageurl" 
may be. 

i have my 
1. html page and mapfile at location 
="C:\ms4w\Apache\htdocs\chk\*.html/map"
2. the tmp directory at location = "C:\ms4w\apache\htdocs\chk\tmp"

In ms4w/apache/log/error.log i get:

[Thu Jan 10 09:19:31 2008] [error] [client 127.0.0.1] File does not 
exist: C:/ms4w/Apache/htdocs/chk/[img], referer: 
http://localhost/chk/example1-9.html


i access the page as: "http://localhost/chk/example1-9.html" with no 
image for the browse mode, when i click the interactive form part i get 
this

     msEvalRegex(): Regular expression error. String ([map]) failed 
expression test.

my html page is:
-------------------------------------------------------------------------------------------
----------------------------------------
<html>
  <head>
    <title>MapServer 5.x Tutorial</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-
8859-1">
    <link type="text/css" rel="stylesheet" href="ms35.css" />
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
  <table align="center" width="680" border="0">
    <tr>
      <td>
        <h3 align="center">
          Example 1.9: Interactive Maps and the Browse Mode
        </h3>
        <div align="center">
	  <img border="1" src="/cgi-bin/mapserv.exe?
map=/ms4w/Apache/htdocs/chk/db.map&layer=states&mode=map" />
        </div>
        <p align="left">The map above was created in &quot;map&quot; 
mode. It is
          a static map (it doesn't change when you click on it).
        </p>

        <!-- START OF MAPSERVER FORM -->
        <form name="mapserv" method="GET" action="/cgi-
bin/mapserv.exe">
          <!-- HIDDEN MAPSERVER CGI VARIABLES -->
          <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="zoom" value="0">
        <input type="hidden" name="layer" value="states">
	 <input type="hidden" name="mode" value="browse">
	  <div align="center">
	    <table border="1" cellpadding="0" cellspacing="0">
	      <tr>
                <td>
		  <!-- THE INTERACTIVE, DYNAMICALLY CREATED 
MAP -->
		  <input type="image" name="img" src="[img]"
                    width="400" height="300">
		</td>
              </tr>
	    </table>
	  </div>
	</form>
        <!-- END OF MAPSERVER FORM -->

         <p align="left">Now, have a look at the mapfile:<br>
      
      <iframe width="100%" src="db.map"></iframe></p>
    
 </td>
              </tr>
</body>
</html>
-------------------------------------------------------------------------------------------
---------------------------------------------
my mapfile is:
MAP
NAME db
  IMAGETYPE      PNG
  EXTENT 246658.296875 56638.5 246745 56743.30078125 
  
  SIZE           800 600
  IMAGECOLOR     255 255 255
 FONTSET "C:/ms4w/Apache/htdocs/chk/fonts/fonts.list"
 WEB
    TEMPLATE  'C:/ms4w/Apache/htdocs/chk/example1-9.html'
    IMAGEPATH 'C:/ms4w/apache/htdocs/chk/tmp/ms_tmp/'
    IMAGEURL  'http://localhost/chk/tmp/ms_tmp/'
# have also tried with IMAGEURL /tmp/ms_tmp/ and /ms_tmp/
  END

PROJECTION
"proj=tmerc"
"lat_0=49"
"lon_0=-2"
"k=0.999601"
"x_0=400000" 
"y_0=-100000"
"ellps=airy"
"units=m"
"no_defs "
END #end projection

#_______________________________________________________
_____________
  # Start of LAYER DEFINITIONS ---------------------------------------------
  LAYER # States polygon layer begins here
    NAME         states
    CONNECTIONTYPE postgis
    CONNECTION "user=***** password=****** dbname=***** 
host=localhost port=5432"

    DATA "geom from table"
     TYPE POLYGON
   
    
    STATUS       OFF


CLASS
      NAME       "buildings"
EXPRESSION ('[var]' = 'Buildings')

     STYLE
        COLOR         255 193 132
        OUTLINECOLOR 255 0 0
      END
    END


  
  END # States polygon layer ends here
  # End of LAYER DEFINITIONS 
#_______________________________________________________
_____________________



END # All map files must come to an end just as all other things must 
come to...

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

please have a look at that, really concerned.
thanks
map.user



More information about the mapserver-users mailing list