]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/changeset/_map.html.erb
Merge branch 'master' into openstreetbugs
[rails.git] / app / views / changeset / _map.html.erb
index 6d7aa96c04fafbafcf95f971e7373b16eb524391..5f5f4aa5d158fbec6239feb233f2491eb09bf697 100644 (file)
     var feature = vectors.getFeatureByFid(id);
     var bounds = feature.geometry.getBounds();
 
-    if ( highlight ) vectors.removeFeatures(highlight);
+    if (bounds.containsBounds(map.getExtent())) {
+      bounds = map.getExtent().scale(1.1);
+    }
+
+    if (highlight) vectors.removeFeatures(highlight);
 
     highlight = new OpenLayers.Feature.Vector(bounds.toGeometry(), {}, {
       strokeWidth: 2,