[OpenLayers-Users] Getting attributes from a Feature-Layer

Kai Behncke Kai-Behncke at gmx.de
Tue Mar 3 07:10:45 EST 2009


Dear list,


I have loaded a couple of Features from a WFS (stored in PostGIS) as a layer.
I can get the internal feature.id  (myWfsLayer.getFeatureById(feature.id) of each feature as well as the geometry.

But I wonder how I can get the attributes (e.g. name, gid etc.) of that layer?

I´m thinking about sending a HttpRequest to a server with a php-File that gives as response the result like (SELECT name, gid from xyz where the_geom= feature.geometry).

I´m pretty sure that this won`t be the most elegant way.
Is there another way how to get the attributes of a feature?

Thank you very much, Kai
-- 
Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL
für nur 17,95 ¿/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a



More information about the Users mailing list