]> git.openstreetmap.org Git - rails.git/commitdiff
Adds first try to add key to cyclemap
authorEmersion <contact@emersion.fr>
Sat, 11 Jul 2015 10:56:20 +0000 (12:56 +0200)
committerEmersion <contact@emersion.fr>
Sat, 11 Jul 2015 10:56:20 +0000 (12:56 +0200)
app/assets/images/key/cyclemap/motorway.png [new file with mode: 0644]
app/assets/images/key/cyclemap/motorway12.png [new file with mode: 0644]
app/assets/images/key/cyclemap/primary.png [new file with mode: 0644]
app/assets/images/key/cyclemap/primary12.png [new file with mode: 0644]
app/assets/images/key/cyclemap/secondary.png [new file with mode: 0644]
app/assets/images/key/cyclemap/secondary12.png [new file with mode: 0644]
app/assets/images/key/cyclemap/trunk.png [new file with mode: 0644]
app/assets/images/key/cyclemap/trunk12.png [new file with mode: 0644]
app/assets/javascripts/leaflet.key.js
config/key.yml

diff --git a/app/assets/images/key/cyclemap/motorway.png b/app/assets/images/key/cyclemap/motorway.png
new file mode 100644 (file)
index 0000000..296f176
Binary files /dev/null and b/app/assets/images/key/cyclemap/motorway.png differ
diff --git a/app/assets/images/key/cyclemap/motorway12.png b/app/assets/images/key/cyclemap/motorway12.png
new file mode 100644 (file)
index 0000000..749493a
Binary files /dev/null and b/app/assets/images/key/cyclemap/motorway12.png differ
diff --git a/app/assets/images/key/cyclemap/primary.png b/app/assets/images/key/cyclemap/primary.png
new file mode 100644 (file)
index 0000000..78ae0e4
Binary files /dev/null and b/app/assets/images/key/cyclemap/primary.png differ
diff --git a/app/assets/images/key/cyclemap/primary12.png b/app/assets/images/key/cyclemap/primary12.png
new file mode 100644 (file)
index 0000000..fed37d0
Binary files /dev/null and b/app/assets/images/key/cyclemap/primary12.png differ
diff --git a/app/assets/images/key/cyclemap/secondary.png b/app/assets/images/key/cyclemap/secondary.png
new file mode 100644 (file)
index 0000000..7928b18
Binary files /dev/null and b/app/assets/images/key/cyclemap/secondary.png differ
diff --git a/app/assets/images/key/cyclemap/secondary12.png b/app/assets/images/key/cyclemap/secondary12.png
new file mode 100644 (file)
index 0000000..cde0085
Binary files /dev/null and b/app/assets/images/key/cyclemap/secondary12.png differ
diff --git a/app/assets/images/key/cyclemap/trunk.png b/app/assets/images/key/cyclemap/trunk.png
new file mode 100644 (file)
index 0000000..d312a65
Binary files /dev/null and b/app/assets/images/key/cyclemap/trunk.png differ
diff --git a/app/assets/images/key/cyclemap/trunk12.png b/app/assets/images/key/cyclemap/trunk12.png
new file mode 100644 (file)
index 0000000..51230a0
Binary files /dev/null and b/app/assets/images/key/cyclemap/trunk12.png differ
index 68e822e7f3504409d41380abc9b9be2af159325d..5223b1420523fd58770177ea66dca42946483d17 100644 (file)
@@ -60,7 +60,7 @@ L.OSM.key = function (options) {
     }
 
     function updateButton() {
-      var disabled = map.getMapBaseLayerId() !== 'mapnik';
+      var disabled = ['mapnik', 'cyclemap'].indexOf(map.getMapBaseLayerId()) === -1;
       button
         .toggleClass('disabled', disabled)
         .attr('data-original-title',
index f1bfde91ffeea8fbfd8babf928a7a05b2c405d46..cbb39ee75d7e7d3f99ef763ff26c06d124c43aab 100644 (file)
@@ -50,3 +50,12 @@ mapnik:
   - { min_zoom: 15, max_zoom: 19, name: permissive, image: permissive.png }
   - { min_zoom: 15, max_zoom: 19, name: destination, image: destination.png }
   - { min_zoom: 12, max_zoom: 19, name: construction, image: construction.png }
+cyclemap:
+  - { min_zoom: 0, max_zoom: 11, name: motorway, image: motorway.png }
+  - { min_zoom: 12, max_zoom: 19, name: motorway, image: motorway12.png }
+  - { min_zoom: 0, max_zoom: 11, name: trunk, image: trunk.png }
+  - { min_zoom: 12, max_zoom: 19, name: trunk, image: trunk12.png }
+  - { min_zoom: 7, max_zoom: 11, name: primary, image: primary.png }
+  - { min_zoom: 12, max_zoom: 19, name: primary, image: primary12.png }
+  - { min_zoom: 9, max_zoom: 11, name: secondary, image: secondary.png }
+  - { min_zoom: 12, max_zoom: 19, name: secondary, image: secondary12.png }
\ No newline at end of file