I have a map where I have selected a feature by attribute, and then centered
and zoomed to the feature using the following:

 

                vectorlayer.events.register('loadend', vectorlayer, function
() {

                                var selfeatures =
vectorlayer.getFeaturesByAttribute("description","description");

 
map.setCenter(selfeatures[0].geometry.getCentroid());

 
map.zoomToExtent(selfeatures[0].geometry.getBounds());

                });

 

I am having trouble getting the feature to highlight.  My select control for
the map uses a popup.  Could this be the problem?  Do I need a second
control to highlight the feature?

 

Any suggestions are appreciated.

 

Thanks,

 

Jerome Wendell

 

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to