[OpenLayers-Users] search feature to attribute

Maren Kiehl maren.kiehl at gmx.de
Sat Aug 29 03:34:44 EDT 2009


Hi at all.

I'm searching for a function which can identify a feature by searching 
an attribute-value.
I have the name of a feature-attribute (feature.attributes.name) and 
wanna search the apposite feature. After that I wanna zoom to the center 
of this feature(map.setCenter(feature.geometry.getBounds().getCenterLonLat(), zoom);). 
The problem ist: I dont know how to identify the feature by knowing the attribute. I get the 
attribute-value from a php-value in another page. By clicking a link on 
this page a window opens and shows a little map with the feature-point 
in the center of it. Everything (little map opens in a popup and shows the extent of all points) 
works except for the last step.
Does somebody know how to get the feature? Does a function for this problem exist?

Thanks for your support.
Best regards,
Maren




More information about the Users mailing list