From 56316e17ada73e35b7ddf9782619823788a92d71 Mon Sep 17 00:00:00 2001 From: Emersion Date: Sat, 11 Jul 2015 12:56:20 +0200 Subject: [PATCH] Adds first try to add key to cyclemap --- app/assets/images/key/cyclemap/motorway.png | Bin 0 -> 187 bytes app/assets/images/key/cyclemap/motorway12.png | Bin 0 -> 232 bytes app/assets/images/key/cyclemap/primary.png | Bin 0 -> 186 bytes app/assets/images/key/cyclemap/primary12.png | Bin 0 -> 205 bytes app/assets/images/key/cyclemap/secondary.png | Bin 0 -> 166 bytes app/assets/images/key/cyclemap/secondary12.png | Bin 0 -> 203 bytes app/assets/images/key/cyclemap/trunk.png | Bin 0 -> 192 bytes app/assets/images/key/cyclemap/trunk12.png | Bin 0 -> 211 bytes app/assets/javascripts/leaflet.key.js | 2 +- config/key.yml | 9 +++++++++ 10 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 app/assets/images/key/cyclemap/motorway.png create mode 100644 app/assets/images/key/cyclemap/motorway12.png create mode 100644 app/assets/images/key/cyclemap/primary.png create mode 100644 app/assets/images/key/cyclemap/primary12.png create mode 100644 app/assets/images/key/cyclemap/secondary.png create mode 100644 app/assets/images/key/cyclemap/secondary12.png create mode 100644 app/assets/images/key/cyclemap/trunk.png create mode 100644 app/assets/images/key/cyclemap/trunk12.png diff --git a/app/assets/images/key/cyclemap/motorway.png b/app/assets/images/key/cyclemap/motorway.png new file mode 100644 index 0000000000000000000000000000000000000000..296f1767720d6c93ac812bb2b3a9adfb722f6ab9 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^CP2)_!3HFIPVMytagw~QL70(Y)*K0-AbW|YuPgg~c5W_Ffm{xqw?H8ePZ!4!i_^(D88^-!P&jX(<51hg z%*@@)quhMuegFUV=5{G@nS_)iiL`_pl^v~(jg1c_mF*vY_;9YCO^uE1Sfa4?{rbO& a3=BpbJYQ90+-CyKWbkzLb6Mw<&;$UPe>aQ( literal 0 HcmV?d00001 diff --git a/app/assets/images/key/cyclemap/motorway12.png b/app/assets/images/key/cyclemap/motorway12.png new file mode 100644 index 0000000000000000000000000000000000000000..749493ad6b1a56474fb298701eaf04046d9e8936 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^CP2)_!3HFIPVMytagw~QL70(Y)*K0-AbW|YuPgg~c5W_pm4#<|G=W00nIRD+&iT2ysd*(pE(3#eQEFmI zYKlU6W=V#EyQgnJie4%^P~6AU#WBRc4{XE)7O>#K07y;j@HtKil;y!cTX3`5R22vf9_v6@ZkaD;SCI2 zpI=Kx%-i?(zz1XHNB;{xTxdSzQL70(Y)*K0-AbW|YuPgg~c5W_RqxIh}egX@OA zxVJwkp)g=VdIHB6X)(K`Tf15(x;8Y=ZFCP$k2rGScdWJK42d?$gvxI}wVAI!)joX4 u_!3HD`GRe3BDYhhUcNd2LAh=-f^2tCE&H|6f zVg?3oVGw3ym^DWND9B#o>FdgVpPidaU&Q~6Suaq?*we)^MB{w&pWXKJ6L&DEwR7_5 z@Bl&i(&YdA?EISY8VM!f3x!2Lf!Y~7UHx3vIVCg! E02FX6P5=M^ literal 0 HcmV?d00001 diff --git a/app/assets/images/key/cyclemap/secondary12.png b/app/assets/images/key/cyclemap/secondary12.png new file mode 100644 index 0000000000000000000000000000000000000000..cde00852323a35f2cffbfb0fe485d4303c11497c GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^CP2)_!3HFIPVMytagw~QL70(Y)*K0-AbW|YuPgg~c5W^Ml_mZh`+-6co-U3d7N?VA0^c7sh&k}y{=Y;- zjPDbPJY%iD@_ceZ$vcjpP&#n<+=5l<<~m6o|1SlzskJ4tMa2PS9$EfkJpxu3qD*}eESX$Lr$sqbCq?jAV)HIy85}Sb4q9e01hxlK>z>% literal 0 HcmV?d00001 diff --git a/app/assets/images/key/cyclemap/trunk.png b/app/assets/images/key/cyclemap/trunk.png new file mode 100644 index 0000000000000000000000000000000000000000..d312a65cb549b55a26497e2880ae684757daa931 GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^CP2)_!3HFIPVMytagw~QL70(Y)*K0-AbW|YuPgg~c5W_BO~-$CrGP@do-U3d7N_r?-zeCiAmDOw|GD1A zPTiS7q5+~Q+Y+?hT+ZD*zK?I-t-A$*>%9sbCW$TlSHiSl&e0^3>sQ)lGDy6i;Ow@$ hLq$+b{@V5*jC+m?xh36i2m>0-;OXk;vd$@?2>|SsKPUhI literal 0 HcmV?d00001 diff --git a/app/assets/images/key/cyclemap/trunk12.png b/app/assets/images/key/cyclemap/trunk12.png new file mode 100644 index 0000000000000000000000000000000000000000..51230a0214a4ac3277c35b295cdb0fde1e0bc066 GIT binary patch literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^CP2*2!3HGVr{%o>Qfx`y?k)`fL2$v|<&%LToCO|{ z#S9GG!XV7ZFl&wkNKc8UuPgg~c5W_hsWTGy`hY?So-U3d7N?WHtp1SvmdKI;Vst0L+a? A=>Px# literal 0 HcmV?d00001 diff --git a/app/assets/javascripts/leaflet.key.js b/app/assets/javascripts/leaflet.key.js index 68e822e7f..5223b1420 100644 --- a/app/assets/javascripts/leaflet.key.js +++ b/app/assets/javascripts/leaflet.key.js @@ -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', diff --git a/config/key.yml b/config/key.yml index f1bfde91f..cbb39ee75 100644 --- a/config/key.yml +++ b/config/key.yml @@ -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 -- 2.39.5