From 2201070cd4d52fab00ee99620772f99b4afea589 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 6 May 2018 19:18:52 +0200 Subject: Use CartoDB Positron as tile layer. --- src/js/app/mapfactory.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/js/app/mapfactory.js b/src/js/app/mapfactory.js index 8d8bb0e..f54060d 100644 --- a/src/js/app/mapfactory.js +++ b/src/js/app/mapfactory.js @@ -1,8 +1,11 @@ define(['leaflet'], function(L) { // base config var attribOSM = '© OpenStreetMap contributors', - OSMLayer = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: attribOSM + attribCarto = '© CartoDB', + TileLayer = L.tileLayer('https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png', { + attribution: 'Imagery ' + attribCarto + ' — Map data ' + attribOSM, + subdomains: 'abcd', + maxZoom: 19 }), scale = L.control.scale({ imperial: false @@ -10,7 +13,7 @@ define(['leaflet'], function(L) { return function(id, bounds) { var map = L.map(id, { - layers: [OSMLayer] + layers: [TileLayer] }) if (bounds) { map.fitBounds(L.latLngBounds(bounds)); -- cgit v1.2.3