Adding the ability to see the min/max lat/lon for a changeset in the data browser...
[rails.git] / app / views / browse / _changeset_details.rhtml
index 765fe4778d721d7b38a4e31f7e54d0ca0cf2abfc..2b711611bf0b676fafdf052dab73ca783e772a47 100644 (file)
     </tr>
   <% end %>
 
+  <% if changeset_details.max_lat.nil? or changeset_details.min_lat.nil? or changeset_details.max_lon.nil? or changeset_details.min_lon.nil? %>
+    <tr>
+      <td>No bounding box has been stored for this changeset.</td>
+    </tr>
+  <% else %>
+    <table>
+      <tr>
+        <td colspan="2" style="text-align:center"><b>Max Latitude: </b><%= changeset_details.max_lat/GeoRecord::SCALE.to_f -%></td>
+      </tr>
+      <tr>
+        <td><b>Min Longitude: </b><%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%></td>
+        <td><b>Max Longitude: </b><%= changeset_details.max_lon/GeoRecord::SCALE.to_f -%></td>
+      </tr>
+      <tr>
+        <td colspan="2" style="text-align:center"><b>Min Latitude: </b><%= changeset_details.min_lon/GeoRecord::SCALE.to_f -%></td>
+      </tr>
+    </table>
+  <% end %>
+
   <% unless @nodes.empty? %>
     <tr valign="top">
       <th>Has the following <%= @node_pages.item_count %> nodes:</th>