From 34835b77e23271c4674dba6f10e5a4334fd045a3 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Mon, 25 Jul 2016 15:28:25 +0200 Subject: [PATCH] [fix] Close #640 : remove MapQuest maps. Add in comment maps.wikimedia.org maps, see https://www.mediawiki.org/wiki/Maps --- searx/static/themes/oscar/js/searx.min.js | Bin 5193 -> 4585 bytes .../themes/oscar/js/searx_src/leaflet_map.js | 25 +++++++----------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/searx/static/themes/oscar/js/searx.min.js b/searx/static/themes/oscar/js/searx.min.js index 8a1055da35f92db88fcf8bd7a67d67d91e10ec73..9bc4aae87a6a5575fee225fd59f95f7cbb83f165 100644 GIT binary patch delta 522 zcmZ8e-D=w~6eeqS(XKQB7fM$sjx!Po962fU2fJd7-E9tmtuV%Di()&rYFSDn(Z9sK z*$b5E1$Muy(d#|HV7Ki%>=|}5d!t)7gw7G?`@VC|hrWXE&8yXgjm=JXyR*^lZGCRe z&$XWbl~4&$LgaHsqy$zV7$ajDg%*6uqtnAgWejUEx3Wa+A$0GTZgjtD&fl-BE(ZTn zR`kc}m*o>dL$lk!IB2zkA~kxm*|mK5ty-su@-R9Zj6eu6?)0t)3m+%9;{_>#7O$J>?sRwP?#wbXZKC_qSSh0FN8v??(zHch1XxP0Som z+&sFLy}k8ude9{j5U++4lG;s(qHJUG@d(S_OuoFm>zVmM4ezj+)<~a9JIX#!&9Ac| zL~YNCv`#CIBeW?G)DS0oe!#IW5+~0n$Hiq_b_}jFcs+Cm`{wkAcsC6#6dU~QLvR3c zXa&|qM{272K(xRL0gp-P{CTR;;TQterdW=we7THPe+i@dzzkX5k4 zk`O5Ap8*84OJk8z`7eww5Z9DzN2tU}_8PGW1x|TrtuCVE!s2bS_#J;4sZKKx31M7S zEO+U_LkkhDC2Mvx6TA`|V))s^R}iC!zDSJtU&JV*+-1xhic6R=f^7?#uX;|i=WF#f zXJfloS|_olegp^)z$;wG;3-Xs)HqjlEtJgf#JVFX0?&v{K%L4i^Qoy&?)Mj~=d5<) z#A`gKe8IhfaxsL%?8nsH2+78#T@$O*vnTQ1;WC7XU=jp>yqmyk?)B6gSX=c?U`)eV z+p6rMQ~OksVYOx~# Fe*?<{Ur_)6 diff --git a/searx/static/themes/oscar/js/searx_src/leaflet_map.js b/searx/static/themes/oscar/js/searx_src/leaflet_map.js index cbcbe157..4be46acb 100644 --- a/searx/static/themes/oscar/js/searx_src/leaflet_map.js +++ b/searx/static/themes/oscar/js/searx_src/leaflet_map.js @@ -122,17 +122,13 @@ $(document).ready(function(){ var map = L.map(leaflet_target); // create the tile layer with correct attribution - var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; - var osmMapnikAttrib='Map data © OpenStreetMap contributors'; - var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib}); - - var osmMapquestUrl='http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg'; - var osmMapquestAttrib='Map data © OpenStreetMap contributors | Tiles Courtesy of MapQuest '; - var osmMapquest = new L.TileLayer(osmMapquestUrl, {minZoom: 1, maxZoom: 18, subdomains: '1234', attribution: osmMapquestAttrib}); - - var osmMapquestOpenAerialUrl='http://otile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg'; - var osmMapquestOpenAerialAttrib='Map data © OpenStreetMap contributors | Tiles Courtesy of MapQuest | Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency'; - var osmMapquestOpenAerial = new L.TileLayer(osmMapquestOpenAerialUrl, {minZoom: 1, maxZoom: 11, subdomains: '1234', attribution: osmMapquestOpenAerialAttrib}); + var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; + var osmMapnikAttrib='Map data © OpenStreetMap contributors'; + var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib}); + + var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png'; + var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © OpenStreetMap contributors'; + var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib}); // init map view if(map_bounds) { @@ -149,12 +145,11 @@ $(document).ready(function(){ map.setView(new L.LatLng(map_lat, map_lon),8); } - map.addLayer(osmMapquest); + map.addLayer(osmMapnik); var baseLayers = { - "OSM Mapnik": osmMapnik, - "MapQuest": osmMapquest/*, - "MapQuest Open Aerial": osmMapquestOpenAerial*/ + "OSM Mapnik": osmMapnik/*, + "OSM Wikimedia": osmWikimedia*/ }; L.control.layers(baseLayers).addTo(map);