Missing javascript in the source

Vincent J. Troisi vincent.troisi at COLORADO.EDU
Thu Aug 25 18:42:13 EDT 2005


We are having a problem replicating the client functions that
were developed on another server. The application uses a
shpfile index to locate the .tiff files and renders the
files as png or jpeg in the 800x800 window and renders a smaller
scale version in an adjacent 400x400 window.


Below is the "source" obtained from the MAC/OS server
that operates correctly. Notice the java script
imbedded in the file. Well, on the linux server (on which we
just installed the mapserver, Version 4.6.0), the javascript
does not appear in the source. The 800x800 image map is blank
but 400x400 reference image appears.

The applications uses gdal_tindex to generate a shpfile
containing the location of the tiff files; however, only the initial 
default tiff file is processed, and as stated above, only the 400x400 
reference map appears.

Any ideas what may be causing the ill behavior by the client in
the linux environment? Is there an environment variable or path
which needs to be integrated into the apache server or the owner
of the apache server?

Thanks
V

Source from the correctly functioning application...

<!-- MapServer version 4.4.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG 
OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
   <title>MapServer Demo Interface</title>
<!--
     <SCRIPT LANGUAGE="JavaScript">
         function mapplet_apply(name, minx, miny, maxx, maxy, redraw) {
           document.mapserv.imgbox.value = minx + " " + miny + " " + 
maxx + " " + maxy;
           document.mapserv.imgxy.value = minx + " " + miny;
         }
         function mapplet_error(message) {
           alert(message);
         }
         function goGlobal() {
           document.mapserv.zoomdir.value = "0";
           //document.mapserv.zoomsize.value = "";
           document.mapserv.imgext.value = "-3174450 -2816050 2867175 
2406325";
           document.mapserv.imgbox.value = "-1 -1 -1 -1";
           document.mapserv.imgxy.value = "400 400";
           document.mapserv.submit();
         }
         // function UpdateMap() {
           // document.mapserv.zoomsize.value = 1;
           // document.mapserv.submit();
        //}
     </SCRIPT>
-->
</head>
<!--<body bgcolor=#FFFFFF> -->
<body bgcolor=#889999>

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

<center>
<table border=3 cellspacing=1 cellpadding=1 bgcolor="#000000">

<tr>
  <td valign="top" align=center bgcolor=#99aabb>
   <table cellpadding="2" cellspacing="2" border="1" cols="1">
     <tr>
       <td align="center" colspan="2">
	<font face="arial,helvetica" size=4 color="#FFFFFF">
	<b>
	<a href="http://www.eos.unh.edu/">
	&nbsp;NSIDC/University of Colorado - EOS/University of New 
Hampshire</a></b></font>

       </td>
     </tr>

     <tr>
       <td>
       <INPUT NAME="img" TYPE="image" SRC="/tmp/MOA112500331810603.jpg"
	  width=800 height=800 color=#FFFFFF border="1">
       </td>
     </tr>

   </table>

  </td>

  <td valign="top" bgcolor=#99aabb>
   <table cellpadding="5" cellspacing="0" border="0">
     <tr>
     <td><hr>
       <center>
         <input type="submit" value="Refresh/Query">
         <!--
         <p>
         <input type="submit" onClick="goGlobal()" value="Full Map">
         -->

       </center>
       <p>
       <input name="ref" type="image" src="/tmp/MOAref112500331810603.jpg">
       <p>
       <b>Zoom</b><p>
        In  <input type=radio name=zoomdir value=1  >
        Pan <input type=radio name=zoomdir value=0  checked>
        Out <input type=radio name=zoomdir value=-1 >

        <p>
        Size <input type=text name=zoomsize size=2 value=2>
        <p>

       <b>Select Layer[s] to Display:</b>
       <br>
       <select multiple size=9 name="layer">
         <option value="grid"    >    Graticule
         <option value="moa_uhc" > moa_uhc
         <option value="moa_vhc" > moa_vhc
         <option value="moa_hc"  >  moa_hc
         <option value="moa"     >     moa
         <option value="moa_lc"  >  moa_lc
         <option value="moa_vlc" > moa_vlc
         <option value="moa_ulc" > moa_ulc
         <option value="ramp"    selected>    ramp
       </select>

       <font face="arial,helvetica" color="#FFFFFF"> <center>
       <p>
       <font face="arial,helvetica" color="#FFFFFF">
       <a 
href="http://mapserver.gis.umn.edu/doc/develop_index.html">documentation</a>
       </center> </font>
     </td>

     </tr>
   </table>

   </td></tr>
</table>

</center>

<input type="hidden" name="imgxy"     value="400 400">
<input type="hidden" name="imgext"    value="-3174450.000000 
-3225675.000000 2867175.000000 2815950.000000">
<input type="hidden" name="map"       value="../Documents/MOA/moa.map">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="program"   value="/cgi-bin/mapserv">

<input type="hidden" name="map_web_imagepath" 
value="/Library/WebServer/Documents/tmp/">
<input type="hidden" name="map_web_imageurl"  value="/tmp/">
<input type="hidden" name="map_web_template"  value="moademo.html">

</form>

</body></html>



More information about the mapserver-users mailing list