- /*
- This function borrowed from the latest version of OpenLayers.Layer.Vector. OSM is using an older version.
- http://trac.osgeo.org/openlayers/browser/trunk/openlayers/lib/OpenLayers/Layer/Vector.js
- */
- function getFeaturesByAttribute(obj, attrName, attrValue) {
- var i,
- feature,
- len = obj.features.length,
- foundFeatures = [];
- for(i = 0; i < len; i++) {
- feature = obj.features[i];
- if(feature && feature.attributes) {
- if (feature.attributes[attrName] === attrValue) {
- foundFeatures.push(feature);
- }
- }
- }
- return foundFeatures;
- }
- function highlightChangesetMap(name) {
- getFeaturesByAttribute(vectors,'name',name)[0].style.strokeColor='#ffff55';
+ function highlightChangeset(id) {
+ var feature = vectors.getFeatureByFid(id);
+ feature.style.strokeColor = "#ffff55";
+ feature.style.strokeWidth = 4;