[OpenLayers-Users] Highlight Selected Feature
Jerome A. Wendell
jawendell at digitalmapping.com
Tue Jan 15 13:23:31 PST 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130115/0ac73c4d/attachment.html>
More information about the Users
mailing list