Skip to content

Commit 80258ff

Browse files
committed
Swap out MapQuest basemaps
1 parent 42ac04d commit 80258ff

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

assets/js/app.js

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -117,23 +117,18 @@ function syncSidebar() {
117117
}
118118

119119
/* Basemap Layers */
120-
var mapquestOSM = L.tileLayer("https://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png", {
120+
var cartoLight = L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png", {
121121
maxZoom: 19,
122-
subdomains: ["otile1-s", "otile2-s", "otile3-s", "otile4-s"],
123-
attribution: 'Tiles courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">. Map data (c) <a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA.'
122+
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="https://cartodb.com/attributions">CartoDB</a>'
124123
});
125-
var mapquestOAM = L.tileLayer("https://{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg", {
126-
maxZoom: 18,
127-
subdomains: ["otile1-s", "otile2-s", "otile3-s", "otile4-s"],
128-
attribution: 'Tiles courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a>. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency'
129-
});
130-
var mapquestHYB = L.layerGroup([L.tileLayer("https://{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg", {
131-
maxZoom: 18,
132-
subdomains: ["otile1-s", "otile2-s", "otile3-s", "otile4-s"]
133-
}), L.tileLayer("https://{s}.mqcdn.com/tiles/1.0.0/hyb/{z}/{x}/{y}.png", {
134-
maxZoom: 19,
135-
subdomains: ["otile1-s", "otile2-s", "otile3-s", "otile4-s"],
136-
attribution: 'Labels courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">. Map data (c) <a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors, CC-BY-SA. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency'
124+
var usgsImagery = L.layerGroup([L.tileLayer("http://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}", {
125+
maxZoom: 15,
126+
}), L.tileLayer.wms("http://services.nationalmap.gov/arcgis/services/USGSImageOnlyLarge/MapServer/WMSServer?", {
127+
minZoom: 16,
128+
layers: "2",
129+
format: 'image/png',
130+
transparent: true,
131+
attribution: "Aerial Imagery courtesy USGS"
137132
})]);
138133

139134
/* Overlay Layers */
@@ -313,7 +308,7 @@ $.getJSON("data/DOITT_MUSEUM_01_13SEPT2010.geojson", function (data) {
313308
map = L.map("map", {
314309
zoom: 10,
315310
center: [40.702222, -73.979378],
316-
layers: [mapquestOSM, boroughs, markerClusters, highlight],
311+
layers: [cartoLight, boroughs, markerClusters, highlight],
317312
zoomControl: false,
318313
attributionControl: false
319314
});
@@ -416,9 +411,8 @@ if (document.body.clientWidth <= 767) {
416411
}
417412

418413
var baseLayers = {
419-
"Street Map": mapquestOSM,
420-
"Aerial Imagery": mapquestOAM,
421-
"Imagery with Streets": mapquestHYB
414+
"Street Map": cartoLight,
415+
"Aerial Imagery": usgsImagery
422416
};
423417

424418
var groupedOverlays = {

0 commit comments

Comments
 (0)