interactive map example1-9.htm

User Map map.user at YAHOO.COM
Thu Jan 10 01:45:12 PST 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\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"

please have a look at this, really concerned. i think the problem is with imageurl tag, i hope i have written it correctly.
thanks
map.user

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&layer=state&layer=stat&mode=map" />
        </div>
        <p align="left">The map above was created in "map" 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/tmp/ms_tmp/'
    IMAGEURL  '/ms_tmp/'
    #IMAGEPATH '/C:/ms4w/Apache/htdocs/chk/tmp/ms_tmp/'
    #IMAGEURL  '/C:/ms4w/Apache/htdocs/chk/tmp/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...
-----------------------------------------------------------------------------------------------------------------------------------------------


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080110/b6f6a2d2/attachment.htm>


More information about the MapServer-users mailing list