[OpenLayers-Users] get feature info

Bart van den Eijnden bartvde at osgis.nl
Mon Jan 4 05:04:08 EST 2010


Hi Herman,

use OpenLayers.Control.WMSGetFeatureInfo and listen to the getfeatureinfo event, you'll get an array of features, then check feature.attributes for its values.

See:

http://dev.openlayers.org/releases/OpenLayers-2.8/examples/getfeatureinfo-control.html

Best regards,
Bart

On Jan 4, 2010, at 10:31 AM, Herman Badenhorst wrote:

> 
> Hi all.
> 
> 
> I've got a layer called "vw_map_rsa_2009" with the following attributes:
> 
> fid      
> gid      
> mapunit      
> country_code      
> map_name      
> map_id      
> mapping_unit_id      
> lus      
> degradation_code      
> degradation_area      
> degradation_degree      
> conservation_code      
> conservation_area      
> conservation_effectiveness
> 
> I have an input form where the "mapping_unit_id" is a field that the user can type OR select from a map.
> When the user clicks on the map, the "mapping_unit_id" must be populated in the input form.
> 
> How do i get the "mapping_unit_id" from the layer?
> 
> Regards,
> Herman
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100104/c95033a1/attachment.html


More information about the Users mailing list