Have you tried configuring the server to "Expose primary keys"? This is 
a data store option. You should be able to deduce the fid from the 
primary key.

Kind regards,
Ben.

On 14/04/11 05:09, Paw3l wrote:
> Hi,
>
> I would like to get a fid of my clicked feature with GetFeatureInfo. It is
> not possible with default settings. I have:
>
> var params = {
>                      REQUEST: "GetFeatureInfo",
>                      EXCEPTIONS: "application/vnd.ogc.se_xml",
>                      BBOX: map.getExtent().toBBOX(),
>                      X: e.xy.x,
>                      Y: e.xy.y,
>                      INFO_FORMAT: 'text/plain',
>                      QUERY_LAYERS: map.layers[0].params.LAYERS,
>                      Srs: 'EPSG:2001',
>                      Layers: 'lay:lay',
>                      Styles: '',
>                      WIDTH: map.size.w,
>                      HEIGHT: map.size.h,
>                      format: format,
>                      buffer: 1
> };
>
> What I get is all of the feature's fields except for it's id (it is a
> primary key in my database).
>
> Could anyone tell me how to get the feature's id?
>
> Regards
>
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/GetFeatureInfo-and-fid-primary-key-tp6270671p6270671.html
> Sent from the GeoServer - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>

-- 
Ben Caradoc-Davies <[email protected]>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to