GetFeatureInfo

Laura Díaz laura.diaz at IVER.ES
Mon Apr 10 09:02:06 PDT 2006


Hi,
just some points in mapserver documentation:

1. ext/html output using MapServer query templates specified in the CLASS template 
parameter. 
2. The MIME type returned by the Class templates defaults to text/html and can be 
controlled using the metadata "wms_feature_info_mime_type"
3. Layer TEMPLATE (required for GetFeatureInfo requests)
4. Layer DUMP TRUE (only required for GetFeatureInfo GML requests)
5. You must set the layer TEMPLATE parameter for the layer to be queryable by 
GetFeatureInfo requests. For requests of type "text/html" you should also set the layer 
HEADER and FOOTER parameters. For GetFeatureInfo requests of GML you must set 
the layer to DUMP TRUE in the mapfile. As of MapServer 4.6 you must also set the 
gml_* metadata for the layer attributes to be served (see the Layer Object metadata in 
the Reference Section later in this document).

an example that works for me:

LAYER
      NAME obras
  METADATA
    "wms_title" "obras"
    gml_include_items "all"
  END       
      STATUS ON
      TYPE POLYGON
      DUMP TRUE
      PROJECTION
      	"init=epsg:23030"
      END      
      CONNECTIONTYPE postgis
      CONNECTION 
  TOLERANCE 3
  CLASS   
    NAME "obras"
    TEMPLATE 'gmap/htdocs/templates/popplace.html'
    COLOR 0 240 240
    OUTLINECOLOR 199 199 199   
  END
END


regards,
Larua
On 10 Apr 2006 at 21:27, SUBSCRIBE MAPSERVER-USERS Joe wrote:
> Dear all,
> 
> I set up my server as WMS Server. The problem is I could not query as html which
> I provide template, header and footer file.
> 
> Is there anyone has an experience setting up WMS server for getfeatureinfo?
> 
> I set up my map file as
> 
> 
> ...
>    WEB
>     IMAGEPATH "/data/maplab-2.2/tmp/"
>     IMAGEURL "/maplab-2.2/tmp/"
> 
>     METADATA
>     "wms_title"     "INFO"  ##required
>     "wms_feature_info_mime_type" "text/html"
>     "wms_onlineresource"
> "http://server.com/cgi-bin/mapserv?map=/data/maplab-2.2/AIT/info.map&"
>     "wms_srs"       "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326"  ##recommended
> 
>     END
> 
> LAYER
>   NAME TEST
> 
> METADATA
> 	"wms_title" "TEST" ##required
>         "wms_feature_info_mime_type" "text/html"
>         "wms_extent" "92.189278,5.610009,109.464638,29.180666"
> END
> 
>   TYPE POLYGON
>   TRANSPARENCY 70
>   DATA asia_bnd
>   STATUS ON
>   TEMPLATE asia.html
> 
>   ...
> END
> 
> 
> Thanks in advance,
> Thip
> 
> 
> ----------------------------------------------------------
> This mail sent through AIT WebMail : http://www.ait.ac.th/
> 



More information about the MapServer-users mailing list