]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/index.rhtml
Remove excessive indenting - tabs are bad people!
[rails.git] / app / views / site / index.rhtml
index 482ed85b89880744e8d556d5082c41a0f627889c..0c6488129740669ba92bf97700e8a1f622b979af 100644 (file)
 </div> 
 
 <div id="attribution">
-<table width="100%">
-<tr>
-<td align="left">http://creativecommons.org/licenses/by-sa/2.0/</td>
-<td align="right">http://openstreetmap.org/</td>
-</tr>
-<tr>
-<td colspan="2" align="center">
-Licensed under the Creative Commons Attribution-Share Alike 2.0 license
-by the OpenStreetMap project and its contributors.
-</td>
-</table>
+  <table width="100%">
+    <tr>
+      <td align="left">http://creativecommons.org/licenses/by-sa/2.0/</td>
+      <td align="right">http://openstreetmap.org/</td>
+    </tr>
+    <tr>
+      <td colspan="2" align="center">Licensed under the Creative Commons Attribution-Share Alike 2.0 license by the OpenStreetMap project and its contributors.</td>
+    </tr>
+  </table>
 </div>
 
 <% if params['mlon'] and params['mlat'] %>
@@ -94,9 +92,11 @@ by the OpenStreetMap project and its contributors.
   function mapInit(){
     map = createMap("map");
 
+    <% unless OSM_STATUS == :api_offline or OSM_STATUS == :database_offline %>
     map.dataLayer = new OpenLayers.Layer("Data", { "visibility": false });
     map.dataLayer.events.register("visibilitychanged", map.dataLayer, toggleData);
     map.addLayer(map.dataLayer);
+    <% end %>
 
     <% if bbox %>
     var bbox = new OpenLayers.Bounds(<%= minlon %>, <%= minlat %>, <%= maxlon %>, <%= maxlat %>);