[OpenLayers-Users] Re: getfeatureinfo mapserver show only the atributname

Jean-François Gigand jf at geonef.fr
Tue Aug 23 18:27:55 EDT 2011


What attributes are exposed can be specified in the metadata
attributes of the layer.

Check out : http://mapserver.org/ogc/wms_server.html


Jean-François Gigand - Geonef
Paris, France - http://geonef.fr/




2011/8/23 boho <fnaci4775 at gmail.com>:
> thanks jean, i've finally solved it by add
> 'wms_title' 'Batas_Kab_region'
>  "wms_dataurl_format" "text/HTML"
>    "gml_include_items"     "all"
>   "gml_exclude_items"     ""
>    "ows_include_items"     "all"
>    "ows_exclude_items"     ""
>    "wms_exceptions_format" "application/vnd.ogc.se_xml"
>  'wms_srs'             'EPSG:4326'
> in my layer metadata.
>
> and this is my openlayers script :
> info = new OpenLayers.Control.WMSGetFeatureInfo({
>        url:
> 'http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/petaPAD/batasKab.map&',
> layers: [layer],
>                 infoFormat: "text/plain",
>        title: 'Identify features by clicking',
>        queryVisible: true,
>        eventListeners: {
>                getfeatureinfo: function(event) {
>
>                map.addPopup(new OpenLayers.Popup.FramedCloud(
>                                "chicken",
>                                map.getLonLatFromPixel(event.xy),
>                                null,
>                                event.text,
>                                null,
>                                true
>                        ));
>                }
>        }
> });
> map.addControl(info);
> info.activate();
> this will return GetFeatureInfo results: Layer 'Batas_Kab_region' Feature
> 18: KAB_KOTA = 'Simalungun' KECAMATAN = 'Simalungun' HL = ''  when i click
> the layer.
>
> my shape has 3 atribute name KECAMATAN ,KAB_KOTA and HL, how if i just want
> to get the KECAMATAN data with getfeatureinfo openlayers??
>
> btw, sorry if my english is not good..
>
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/getfeatureinfo-mapserver-show-only-the-atribut-name-tp6712417p6716424.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>


More information about the Users mailing list