TEMPLATE in map file doesn't run, why?

Jacob Delfos jacob.delfos at MAUNSELL.COM
Wed Jul 20 04:51:37 EDT 2005


What form input elements do you have in your template? When you say "any clicking zone appears", does that mean when you click, the map disappears? 
Normally when you click, the page submits. If your input elements in your template are not correct, or missing, it may submit to an incorrect link, or with incorrect parameters. Maybe you can post the relevant bits of your template.

regards,

Jacob


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of N M
Sent: 20 July 2005 16:43
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] TEMPLATE in map file doesn't run, why?

Hi Daniele,

I understand what you are telling me but the problem is that although I had 
an .html page when I execute mapserver, I can't click anywhere in the map, 
any clicking zone appears.

I tried using TEMPLATE in LAYER section, in WEB section and in CLASS section 
but nothing occurs.


>
>A TEMPLATE is an existing .html file that is used by CGI Mapserver as a
>"skeleton" page: in this page, there are some fields that Mapserver
>substitutes with the image of the map, the scalebar, the reference map,
>and other variables (current scale, current extent, and so on).
>
>This TEMPLATE must be defined in the WEB section of the mapfile
>(http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#web).
>
>
>You can also use a TEMPLATE in the CLASS section
>(http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#class) or -
>if you want the same template for each class of a layer - in the LAYER
>section
>(http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#layer) of the
>mapfile.
>
>In this case, the TEMPLATE (this also must be an existing .html file) is
>used by CGI Mapserver when you query the map: the template contains
>field that are substituted with vaules of the queried attributes.
>
>
>In your example mapfile, the TEMPLATE instruction as the following
>meaning:
>"When you query the map, show results (for this layer) using
>http://www.nusvirtual.com as template".
>The question is: is this a good template file?
>
>But I suggest you to use a "local" .html file as a template.
>
> Daniele
>
>
>-----Original Message-----
>From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
>Behalf Of SUBSCRIBE MAPSERVER-USERS Nuri
>Sent: Wednesday, July 20, 2005 9:32 AM
>To: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: [UMN_MAPSERVER-USERS] TEMPLATE in map file doesn't run, why?
>
>
>Hi,
>
>I inserted a TEMPLATE instruction in my map file but the link doesn't
>run in the map.
>
>Someone could tell me why I'm doing wrong? Thank you.
>
>This is my map file:
>
>
>MAP
>   IMAGETYPE      PNG
>   EXTENT   20.000000 18.000000 50.000000 110.000000
>   SIZE           500 350
>   SHAPEPATH      "data"
>   IMAGECOLOR     255 180 0
>   SYMBOLSET      "symbols/symbols35.sym"
>   FONTSET "fonts/fonts.list"
>
>   # Start of LAYER DEFINITIONS
>--------------------------------------------
>-
>
>   LAYER # Capa de raster
>     NAME mapafig
>     DATA "raster/figueres.tif"
>     STATUS DEFAULT
>     TYPE RASTER
>     PROCESSING "BANDS=1,2,3"
>     OFFSITE 0 0 255
>   END # Fi capa de raster
>
>   LAYER
>     NAME "prova"
>     TEMPLATE "http://www.nusvirtual.com"    <--------
>????????????????????
>     TYPE POINT
>     CONNECTIONTYPE OGR
>     CONNECTION "mapa21.ovf"
>     DATA "mapa21"
>     LABELITEM "id"
>     #PROJECTION
>     #  "init=epsg:4326"
>     #END
>
>     CLASS
>       SYMBOL 'symbols/prova.gif'
>       #SIZE 6
>       COLOR 255 0 0
>       LABEL
>      SIZE MEDIUM
>      TYPE BITMAP
>      COLOR 0 0 0
>       END
>     END
>END
>
>   # End of LAYER DEFINITIONS ------------------------------- END # end
>of map file
>
>

_________________________________________________________________
Descubre la descarga digital con MSN Music. Más de medio millón de 
canciones. http://music.msn.es/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050720/b5ce5fb3/attachment.html


More information about the mapserver-users mailing list