<%= render :partial => 'key' %>
<%= render :partial => 'search' %>
-<noscript><div id="noscript"><p>You are either using a browser that doesn't support javascript, or you have disabled javascript.</p>
-<p>OpenStreetMap uses javascript for its slippy map.</p>
-<p>Try the <a href="http://tah.openstreetmap.org/Browse/">OpenStreetMap static tile browser</a>.</p></div></noscript>
+<noscript>
+ <div id="noscript">
+ <p>You are either using a browser that doesn't support javascript, or you have disabled javascript.</p>
+ <p>OpenStreetMap uses javascript for its slippy map.</p>
+ <p>You may want to try the <a href="http://tah.openstreetmap.org/Browse/">Tiles@Home static tile browser</a> if you are unable to enable javascript.</p>
+ </div>
+</noscript>
<div id="map">
<div id="permalink"><a href="/" id="permalinkanchor">Permalink</a></div>
function mapInit(){
map = createMap("map");
+ map.dataLayer = new OpenLayers.Layer("Data", { "visibility": false });
+ map.dataLayer.events.register("visibilitychanged", map.dataLayer, toggleData);
+ map.addLayer(map.dataLayer);
+
<% if bbox %>
var bbox = new OpenLayers.Bounds(<%= minlon %>, <%= minlat %>, <%= maxlon %>, <%= maxlat %>);
handleResize();
}
+ function toggleData() {
+ if (map.dataLayer.visibility) {
+ <%= remote_function :url => { :controller => 'browse', :action => 'start' } %>
+ } else {
+ closeSidebar();
+ }
+ }
+
function getPosition() {
return getMapCenter();
}