GetFeatureInfo still not working

Clint Johnson cjohnson at REFRACTIONS.NET
Tue Apr 11 13:18:43 EDT 2006


GetFeature is a WFS request; yet I do not see a wfs_name declared within 
your mapping file.

You want something like:

LAYER
  NAME TEST
  METADATA
    "wms_title" "TEST" ##required    
    "gml_include_items" "all"
    "wfs_title" "TEST"        
  END
  ...


   
   
That may explain why you are getting an invalid layer name.  When making 
your request ensure that you specify the layer name (TEST and not test).

Your query via a webbrowser should look something like this:
- Correct all pseudo values with the correct ones
- Note that we specify the layer name (TEST) for the TYPENAME parameter.
- Note that, as mentioned above, you must declare your wfs_title name
- Check the results of your GetCapabilities and check that WFS support 
was compiled in.

http://ip-address/path-to-mapserver-cgi/mapserv.exe?map=C:\foo\foo.map&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=TEST



Clint


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/
>>>
>>>       



More information about the mapserver-users mailing list