]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/changeset/_map.html.erb
Use num_changes to detect empty changesets instead of the bbox
[rails.git] / app / views / changeset / _map.html.erb
index 39906af0833925c8098555e331f972bb9b77d80f..69d32b2c2357439c9058576e1d16e6ec418d1724 100644 (file)
@@ -50,6 +50,7 @@
     var bounds = new OpenLayers.Bounds();
 
     <% @edits.each do |edit| %>
+    <% if edit.has_valid_bbox? %>
     var minlon = <%= edit.min_lon / GeoRecord::SCALE.to_f %>;
     var minlat = <%= edit.min_lat / GeoRecord::SCALE.to_f %>;
     var maxlon = <%= edit.max_lon / GeoRecord::SCALE.to_f %>;
@@ -60,6 +61,7 @@
 
     addBoxToMap(bbox, "<%= edit.id %>", true);
     <% end %>
+    <% end %>
 
     vectors.events.on({
       "featureselected": function(feature) {