[mapserver-users] what is the way to get feature info inmapserver?
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Thu Jul 29 11:01:40 PDT 2010
Hi,
Apache access log file is logging all the incoming requests. With MS4W installation it is in [drive]:\ms4w\apache\logs\access.log. It is wasting your time to do anything else now before having a look on the log. Next go and fire GetFeatureInfo requests manually with a browser. Edit requests with text editor and you will have a full control on what is happening. Once you know that Mapserver side is OK you can continue to OpenLayers side and make it to send proper requests.
I have not used GetFeatureInfo a lot but I think that there is something mixed now. If you want text/plain infoformat then a real html template is not needed nor used. The template file must exist but it does not need to contain anything else than the magic string to pass the validation. It you want to use the template then the outputformat is text/html.
I did sent my answer to the mailing list as well, I suppose it will appear sooner or later in the thread.
-Jukka-
-----Alkuperäinen viesti-----
Lähettäjä: Enrico Oemi [mailto:enrico.oemi at gmail.com]
Lähetetty: to 29.7.2010 19:03
Vastaanottaja: Rahkonen Jukka
Kopio: Lime, Steve D (DNR)
Aihe: Re: [mapserver-users] what is the way to get feature info inmapserver?
I've added the METADATA
"wms_include_items" "all"
but I still have to resolve some problems at OpenLayers side, because
I cannot understand if the click event is fired, so I cannot say if
the server-side is all right or not.
PS: I can't see any reply on the web at the page
http://osgeo-org.1803224.n2.nabble.com/Mapserver-User-f1969211.html,
but only in my email. Is this correct?
Thanks,
Kiks
2010/7/29 Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi>:
> Hi,
>
> Even if you'd get it working, without adding wms_include_items the GetFeatureInfo result will not have any useful information. I tried once to understand how GetFeatureInfo is configered in Mapserver, see
> http://permalink.gmane.org/gmane.comp.gis.mapserver.user/41818
>
> I suggest you to see from the Apache request logs what is coming in and test those GetFeatureInfo queries with browser.
>
> -Jukka Rahkonen-
>
>
>
>
> -----Alkuperäinen viesti-----
> Lähettäjä: mapserver-users-bounces at lists.osgeo.org puolesta: Lime, Steve D (DNR)
> Lähetetty: to 29.7.2010 18:07
> Vastaanottaja: Kiks; mapserver-users at lists.osgeo.org
> Aihe: RE: [mapserver-users] what is the way to get feature info inmapserver?
>
> Hi Kiks: Basic configuration looks fine, but what problem are you experiencing, what are the symptoms? Have you tried getInfo requests outside of the OL framework? If so, what happens?
>
> Steve
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Kiks
> Sent: Thursday, July 29, 2010 8:36 AM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] what is the way to get feature info in mapserver?
>
>
> Hi to all,
> I'm trying to obtain information by clicking on the map and display it on a
> popup window with Openlayers.
> First of all, I added to my mapfile the template reference that is this:
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> </head>
> <body>
> <tr bgcolor=#FFFFD0>
> <td>[COD]</td>
> <td>[FOG]</td>
> <td>[NUM]</td>
> </tr>
> </body>
> </html>
>
> (where COD, FOG and NUM are the name of the fields on the same table where
> the spatial information of my layer are)
>
> then I added to the LAYER section this:
> ...
> METADATA
> "wms_title" "Parcels"
> "wms_info_format" "text/plain"
> END
> TEMPLATE "..\template\Parcel.html"
> ...
>
> then I worked on OpenLayer to make the WMS getFeatureInfo call.
>
> I'm sure I'm forgiving or misunderstanding something important, but I can't
> find what..
> Has anybody suggestions or tutorial to do this working?
>
> thanks again,
> Kiks
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/what-is-the-way-to-get-feature-info-in-mapserver-tp5347323p5347323.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
More information about the MapServer-users
mailing list