GetFeatureInfo still not working
Laura Díaz
laura.diaz at IVER.ES
Tue Apr 11 02:43:05 PDT 2006
Hi,
maybe you can try adding this extra fields to the WEB tag in your map file, replacing the
html files by yours:
WEB
HEADER "./html/header.html"
FOOTER "./html/footer.html"
LOG "log/wmsserver.log"
METADATA
....
"wms_feature_info_mime_type" "text/html"
....
END
END # WEB
If i add this and i define a class like the example that follows it works for us, see the
templates used are within the CLASS tag in tha layer definition
LAYER
NAME lakespy2
TYPE POLYGON
STATUS OFF
DATA lakespy2
CLASS
NAME 'Lakes & Rivers'
TEMPLATE "templates/lakespy2.html"
STYLE
COLOR 49 117 185
END
END
HEADER "templates/lakespy2_header.html"
FOOTER "templates/lakespy2_footer.html"
TOLERANCE 3
DUMP TRUE # allow GML export
METADATA
WMS_TITLE "Lakes and Rivers"
WMS_ABSTRACT "DLG lake and river polygons for Itasca County. See
http://deli.dnr.state.mn.us/metadata/full/dlglkpy2.html for more
information."
WMS_SRS "EPSG:26915"
END
END # lakes
hope this helps...
Laura.
On 11 Apr 2006 at 14:49, Thip wrote:
> Dear Laura and Bart and all,
>
> I think I set everything that you mentioned but when
>
> Case 1: error -- I query through OGC wmsviewer, it comes with: WMS server
> error: Invalid layer (S) given in the LAYERS parameter.
>
> Case 2: text/plain return -- If I overlay this layer with maplab and query,
> the information given as text/plain not as the template which I set as
> table.
>
> When, I follow the WMS server documentation, GETMAP, GETCAPABILITY and
> GETFEATUREINFO, the result comes out fine.
>
> So, is there anything that I miss and you figure it out, pls. let me know.
>
>
> 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://203.159.29.10/cgi-bin/mapserv?map=/data/maplab-2.2/AIT/info.map&"
>
> "wms_srs" "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326" ##recommended
>
> "wms_version" "1.1.0"
>
> "wms_getmap"
> "http://203.159.29.10/cgi-bin/mapserv?map=/data/maplab-2.2/AIT/info.map&"
>
> "wms_getfeatureinfo"
> "http://203.159.29.10/cgi-bin/mapserv?map=/data/maplab-2.2/AIT/info.map&"
>
> "wms_featureinfoformat" "text/html"
>
> END
>
> END
>
> LAYER
>
> NAME TEST
>
> METADATA
>
> "wms_title" "TEST" ##required
>
> "gml_include_items" "all"
>
> END
>
> TYPE POLYGON
>
> DUMP TRUE
>
> TRANSPARENCY 70
>
> DATA asia_bnd
>
> STATUS ON
>
> CLASSITEM cntry_name
>
> LABELITEM cntry_name
>
> HEADER asia_header.html
>
> FOOTER footer.html
>
> PROJECTION
>
> "init=epsg:4326"
>
> END
>
> CLASS
>
> NAME "Asia Boundary"
>
> EXPRESSION /./
>
> TEMPLATE /data/maplab-2.2/AIT/data/asia.html
>
> STYLE
>
> OUTLINECOLOR 74 74 74
>
> COLOR 192 207 203
>
> END
>
> Thanks in advance,
> Thip
>
>
> ----- Original Message -----
> From: "Laura Díaz" <laura.diaz at IVER.ES>
> To: <MAPSERVER-USERS at LISTS.UMN.EDU>
> Sent: Monday, April 10, 2006 11:02 PM
> Subject: Re: [UMN_MAPSERVER-USERS] GetFeatureInfo
>
>
> > 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/
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060411/225068a7/attachment.htm>
More information about the MapServer-users
mailing list