]> git.openstreetmap.org Git - rails.git/commitdiff
Use the keyid to identify the layer to using when exporting to an
authorTom Hughes <tom@compton.nu>
Wed, 8 Sep 2010 16:13:54 +0000 (17:13 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 8 Sep 2010 16:13:54 +0000 (17:13 +0100)
embeddable map. Fixes #3221.

app/views/export/start.rjs
public/export/embed.html

index cc4d198cd847f05e52dabff3357845c7e14cc268..b9e2da7f674edc3ec0d3a8dfeff14a91134884f6 100644 (file)
@@ -227,7 +227,7 @@ page << <<EOJ
 
   function htmlUrlChanged() {
     var bounds = new OpenLayers.Bounds($("minlon").value, $("minlat").value, $("maxlon").value, $("maxlat").value);
-    var layerName = map.baseLayer.name.toLowerCase();
+    var layerName = map.baseLayer.keyid;
     var url = "http://#{SERVER_URL}/export/embed.html?bbox=" + bounds.toBBOX() + "&layer=" + layerName;
     var markerUrl = "";
 
index 35b93a2acdbb3ce59452cfd7cf9dbfb092663fb1..bba67025572fc05642d44511f876b51032b2c5a5 100644 (file)
@@ -56,7 +56,7 @@
                    attribution: attribution
                 });
                 map.addLayer(osmarender);
-            } else if (args.layer == "cycle map") {
+            } else if (args.layer == "cyclemap" || args.layer == "cycle map") {
                 var cyclemap = new OpenLayers.Layer.OSM.CycleMap("Cycle Map", {
                    displayOutsideMaxExtent: true,
                    wrapDateLine: true,