[mapserver-users] What is required to be able to query pointlayers?

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Fri Dec 26 02:25:53 EST 2008


Hi,

Document http://mapserver.gis.umn.edu/docs/howto/wms_server tells:

>         Configuring for GetFeatureInfo Requests:

>      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.
(My addition here: The file that TEMPLATE refers to must exist in your computer, but it can be even an empty file).

>      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).

Thus, try these steps:

1) add DUMP TRUE
2) add TEMPLATE c:\ms4w\apps\template\foo.html and create an empty foo.html file with that name
3) add to layer metadata "ows_include_items" "all"
 
That should be enough.

-Jukka Rahkonen-


-----Alkuperäinen viesti-----
Lähettäjä: mapserver-users-bounces at lists.osgeo.org puolesta: José María Michia
Lähetetty: pe 26.12.2008 2:43
Vastaanottaja: nikos at maich.gr
Kopio: mapserver-users at lists.osgeo.org
Aihe: Re: [mapserver-users] What is required to be able to query pointlayers?
 
2008/12/25 <nikos at maich.gr>
>
> Hello and Merry X-mas to all,
>
> Bit of a bother here. I've received a point layer to add to my current app,
> and while I'm able to render it, I cannot get a query to work.
>
> Even with a huge tolerance, clicking on points does not return a result.
> The shapefile check outs fine and queries in ESRI and Qgis apps.
>
> Using MS 5.3-dev from FWTools, on XP
>
> would appreciate some help,
>
> Attached is the map file,
>
> regards,
>
> nikos

I believe that the LAYER/CLASS object lacks the TEMPLATE parameter.
You may want to check this.

For example, you must add a line in this way:

> ########################
> map
> ....
>  # 2 layer 2006_xy_opekepe_Karditsa
>  layer
>    classitem "AFM"
>    data "2006_xy_opekepe_Karditsa"
# Add this here:
>    template "2006_xy_opekepe_Karditsa_template.html"
#
>    footer "2006_xy_opekepe_Karditsa_footer.html"
>    group "2006_xy_opekepe_Karditsa"
>    header "2006_xy_opekepe_Karditsa_header.html"
>    labelcache on
>    labelitem "AFM"
>    name "2006_xy_opekepe_Karditsa"
>    postlabelcache true
>    status on
>    type point
>    TOLERANCE    600
>    TOLERANCEUNITS      pixels
>    TRANSPARENCY 60
>    # 1 class 2006_xy_opekepe_Karditsa_1
>    class
>      STYLE
>         SYMBOL 'CIRCLE'
>         SIZE 10
>         OUTLINECOLOR 0 0 0
>         COLOR 24 93 38
>       END
>    END
>  end
> ....

Saludos
José María
_______________________________________________
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