Default export format based on selected base layer.
authorTom Hughes <tom@compton.nu>
Thu, 17 Apr 2008 23:10:35 +0000 (23:10 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 17 Apr 2008 23:10:35 +0000 (23:10 +0000)
app/views/export/_start.rhtml

index 481b41c3d1cf33af5b6031f0aed4acc77c4216b0..66f79f6e63d248a0aa80cfb18ee609bb9bca0f1d 100644 (file)
 
     map.events.register("moveend", map, mapMoved);
 
-    $("viewanchor").className = "";
-    $("exportanchor").className = "active";
-
     openSidebar({ onclose: stopExport });
 
     updateRegion(map.getExtent());
+
+    if (map.baseLayer.name == "Mapnik") {
+      $("format_mapnik").checked = true;
+    } else if (map.baseLayer.name == "Osmarender") {
+      $("format_osmarender").checked = true;
+    }
+
+    formatChanged();
+
+    $("viewanchor").className = "";
+    $("exportanchor").className = "active";
   }
 
   function stopExport() {