TEMPLATE different result......??????

Eduardo Arévalo earevaloch at GMAIL.COM
Fri Jul 14 10:59:48 PDT 2006


hello list
I have constructed following mapfile :

MAP
  NAME            EX1.9
  IMAGETYPE      PNG24
  #EXTENT        -81.328393 -18.351232 -68.653396 -0.038607
  EXTENT    2302807 -6483741 3702046 -4286330 #laea
  SIZE          400 300
  SHAPEPATH      "/home/postgres/vectores"
  FONTSET   "/home/earevalo/mapserver-4.8.3/fonts/fonts.list"
  SYMBOLSET "/home/earevalo/mapserver-4.8.3/symbols/line.sym"

WEB
    TEMPLATE  "/usr/local/apache2/htdocs/httpmapinteractivo.html"
    IMAGEPATH "/home/earevalo/mapserver-4.8.3/tmp/"
    IMAGEURL  "/tmp/"
    LOG       "/home/earevalo/mapserver-4.8.3/log/mslog"
END

 PROJECTION
   # "proj=laea"
   # "ellps=clrk66"
   # "lat_0=45"
   # "lon_0=-100"
  "init=epsg:2163"
 END

LAYER
    NAME         Peru_poly
    DATA         departamentos
    STATUS       OFF
    TYPE         POLYGON
   PROJECTION
    "init=epsg:4326"
   END
   CLASSITEM      "nomb_dep"
      CLASS
      NAME       "departamento selva"
      EXPRESSION "UCAYALI"
        STYLE
            SYMBOL      0
            COLOR    232 232 232
       END
      END
  END

 LAYER #MOSAICO PERÚ
  NAME            Mosaico_Peru
  DATA            "/home/postgres/raster/PERU300DPI.tif"
  STATUS    OFF#DEFAULT
  TYPE            RASTER
  PROCESSING      "BANDS=1,2,3"
  OFFSITE   71 74 65
  PROJECTION
   "init=epsg:4326"
  END
END

LAYER #CAPA EXTERNA WMS
NAME        Mosaico_WMS
TYPE        RASTER
OFFSITE           0 0 0
STATUS            OFF#OFF
CONNECTIONTYPE    WMS
CONNECTION  "
http://10.1.6.46/cgi-bin/mapserv?map=mapwms.map&SERVICE=wms&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Mosaico_Peru
"

METADATA
  "wms_srs" "EPSG:4326"
  "wms_name" "Mosaico"
  "wms_server_version" "1.1.1"
  "wms_format" "image/jpeg"
END
PROJECTION
   "init=epsg:4326"
 END
END


LAYER #CAPA DEPARTAMENTOS
 NAME       Peru_poly
 DATA       departamentos
 STATUS           OFF
 TYPE       LINE

 PROJECTION
 "init=epsg:4326"
  END

CLASSITEM   "nomb_dep"
   CLASS
    NAME    "departamento selva"
    EXPRESSION    "UCAYALI"
    STYLE
      SYMBOL      'line'
      COLOR 32 32 32
      SIZE  1
    END
  END
END

LAYER #CAPA DEPARTAMENTOS
NAME        Peru_poly
DATA        departamentos
STATUS            OFF
TYPE        LINE

PROJECTION
"init=epsg:4326"
END
CLASSITEM   "nomb_dep"
   CLASS
   NAME           "Departamentos Costa"
   EXPRESSION     "LIMA"
   STYLE
     SYMBOL 'line'
     COLOR  32 32 32
     SIZE   1
    END
  END
END

LAYER #TITULOS DE DEPARTAMENTOS
 NAME       Titulos
 DATA       departamentos
 STATUS           OFF
 TYPE       ANNOTATION
 PROJECTION
 "init=epsg:4326"
 END

 CLASSITEM  "nomb_dep"
 LABELITEM  "capital"
   CLASS
   EXPRESSION     /./
   STYLE
   COLOR    -1 -1 -1
   END

   LABEL
   COLOR    132 31 31
   SHADOWCOLOR    218 218 218
   SHADOWSIZE     1 1
   TYPE           TRUETYPE
   FONT           arial-bold
   SIZE           8
   ANTIALIAS      TRUE
   POSITION CL
   PARTIALS FALSE
   MINDISTANCE    200
   BUFFER   4
   END
  END
END
END
END
 in the line
 WEB
    TEMPLATE  "/usr/local/apache2/htdocs/httpmapinteractivo.html"
........

it calls to template following:
<html>
  <head>
    <title>prueba</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link type="text/css" rel="stylesheet" href="/tutorial/ms35.css" />
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
  <table align="center" width="680" border="0">

    <tr>
      <td>
        <h3 align="center">
          Ejemplo 1: Mapa interctivo y modo Browse
        </h3>
        <div align="center">
      <img border="1" src="/cgi-bin/mapserv?map=/home/earevalo/mapserver-
4.8.3/tests/cincomapinter.map&layer=Peru_poly&layer=Mosaico_Peru&layer=Titulos&mode=map"
/>
        </div>
<p>--------------------------------------------------</p>
        <!-- START OF MAPSERVER FORM -->
        <form name="mapserv" method="GET" action="/cgi-bin/mapserv">
          <!-- HIDDEN MAPSERVER CGI VARIABLES -->
          <input type="hidden" name="map" value="[map]">
          <input type="hidden" name="imgext" value="[mapext]">
          <input type="hidden" name="imgxy" value="200.0 150.0">
      <input type="hidden" name="zoom" value="0">
      <input type="hidden" name="layer" value="Mosaico_Peru">
      <input type="hidden" name="layer" value="Peru_poly">
      <!--input type="hidden" name="layer" value="Titulos"-->
      <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 -->
      </td>
</tr>
</table>
</body>
</html>

when I invoke to mapfile with:
http://10.1.6.46/cgi-bin/mapserv?map=/home/earevalo/mapserver-4.8.3/tests/cincomapinter.map&mode=browse

the resulting HTML is:

<!-- MapServer version 4.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE -->
<html>
  <head>
    <title>prueba</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link type="text/css" rel="stylesheet" href="/tutorial/ms35.css" />
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
  <table align="center" width="680" border="0">

    <tr>
      <td>
        <h3 align="center">
          Ejemplo 1: Mapa interctivo y modo Browse
        </h3>
        <div align="center">
	  <img border="1"
src="/cgi-bin/mapserv?map=/home/earevalo/mapserver-4.8.3/tests/cincomapinter.map&layer=Peru_poly&layer=Mosaico_Peru&layer=Titulos&mode=map"
/>
        </div>
<p>--------------------------------------------------</p>

        <!-- START OF MAPSERVER FORM -->
        <form name="mapserv" method="GET" action="/cgi-bin/mapserv">
          <!-- HIDDEN MAPSERVER CGI VARIABLES -->
          <input type="hidden" name="map"
value="/home/earevalo/mapserver-4.8.3/tests/cincomapinter.map">
          <input type="hidden" name="imgext" value="1537485.833333
-6483741.000000 4467367.166667 -4286330.000000">
          <input type="hidden" name="imgxy" value="200.0 150.0">
	  <input type="hidden" name="zoom" value="0">
	  <input type="hidden" name="layer" value="Mosaico_Peru">
	  <input type="hidden" name="layer" value="Peru_poly">

	  <!--input type="hidden" name="layer" value="Titulos"-->
	  <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="/tmp/EX1.911528997113671.png"
                    width="400" height="300">
		</td>

              </tr>
	    </table>
	  </div>
	</form>
        <!-- END OF MAPSERVER FORM -->


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

</body>
</html>

the problem is the EXTENT (2302807 -6483741 3702046 -4286330) of mapfile is
different that imgext [

1537485.833333 -6483741.000000 4467367.166667 -4286330.000000]


by this it does not show the image to give an aid me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060714/0210abc2/attachment.htm>


More information about the MapServer-users mailing list