Sfoglia il codice sorgente

[fix] Close #640 : remove MapQuest maps. Add in comment maps.wikimedia.org maps, see https://www.mediawiki.org/wiki/Maps

Alexandre Flament 8 anni fa
parent
commit
34835b77e2

+ 2
- 2
searx/static/themes/oscar/js/searx.min.js
File diff suppressed because it is too large
Vedi File


+ 10
- 15
searx/static/themes/oscar/js/searx_src/leaflet_map.js Vedi File

@@ -122,17 +122,13 @@ $(document).ready(function(){
122 122
             var map = L.map(leaflet_target);
123 123
 
124 124
             // create the tile layer with correct attribution
125
-	        var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
126
-	        var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
127
-	        var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
128
-	        
129
-	        var osmMapquestUrl='http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg';
130
-	        var osmMapquestAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors | Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">';
131
-	        var osmMapquest = new L.TileLayer(osmMapquestUrl, {minZoom: 1, maxZoom: 18, subdomains: '1234', attribution: osmMapquestAttrib});
132
-	        
133
-	        var osmMapquestOpenAerialUrl='http://otile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg';
134
-	        var osmMapquestOpenAerialAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors | Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png"> | Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency';
135
-	        var osmMapquestOpenAerial = new L.TileLayer(osmMapquestOpenAerialUrl, {minZoom: 1, maxZoom: 11, subdomains: '1234', attribution: osmMapquestOpenAerialAttrib});
125
+	    var osmMapnikUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
126
+	    var osmMapnikAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
127
+	    var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});
128
+
129
+	    var osmWikimediaUrl='https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';
130
+	    var osmWikimediaAttrib = 'Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
131
+	    var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});
136 132
 
137 133
             // init map view
138 134
             if(map_bounds) {
@@ -149,12 +145,11 @@ $(document).ready(function(){
149 145
                     map.setView(new L.LatLng(map_lat, map_lon),8);
150 146
             }
151 147
 
152
-	        map.addLayer(osmMapquest);
148
+	        map.addLayer(osmMapnik);
153 149
 	        
154 150
 	        var baseLayers = {
155
-             "OSM Mapnik": osmMapnik,
156
-             "MapQuest": osmMapquest/*,
157
-             "MapQuest Open Aerial": osmMapquestOpenAerial*/
151
+             "OSM Mapnik": osmMapnik/*,
152
+             "OSM Wikimedia": osmWikimedia*/
158 153
             };
159 154
 
160 155
             L.control.layers(baseLayers).addTo(map);