Skip to content

Commit 4e4eb80

Browse files
add DarkMatter base tiles; improved host selection
* removed OSM B&W, which seems to no longer exist
1 parent d4170b4 commit 4e4eb80

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

js/tracker.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -257,35 +257,35 @@ var maptypes = {
257257
'Bing.com & Ordnance Survey',
258258
10,
259259
17,
260-
function(xy,z) { return 'http://ecn.t'+(Math.round(Math.random()*3)+1)+'.tiles.virtualearth.net/tiles/r'+makeQuad(xy.x, xy.y, z)+'?g=2689&lbl=l1&productSet=mmOS'; }
260+
function(xy,z) { return 'http://ecn.t'+((Math.abs(xy.x+xy.y)%3)+1)+'.tiles.virtualearth.net/tiles/r'+makeQuad(xy.x, xy.y, z)+'?g=2689&lbl=l1&productSet=mmOS'; }
261261
],
262262
osm: [
263263
'OSM',
264264
'OpenStreetMaps.org',
265265
1,
266266
19,
267-
function(xy,z) { var n = Math.pow(2,z); return (xy.y<0 || xy.y>=n) ? null : 'http://'+['a','b','c'][Math.round(Math.random()*2)]+'.tile.openstreetmap.org/'+z+'/'+wrapTiles(xy.x,z)+'/'+xy.y+'.png'; }
267+
function(xy,z) { var n = Math.pow(2,z); return (xy.y<0 || xy.y>=n) ? null : 'http://'+['a','b','c'][Math.abs(xy.x+xy.y)%3]+'.tile.openstreetmap.org/'+z+'/'+wrapTiles(xy.x,z)+'/'+xy.y+'.png'; }
268268
],
269-
osm_bw: [
270-
'OSM B&W',
271-
'OSM Black & White',
269+
dark_matter: [
270+
'Dark Matter',
271+
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB</a>',
272272
1,
273-
16,
274-
function(xy,z) { var n = Math.pow(2,z); return (xy.y<0 || xy.y>=n) ? null : 'http://'+['a','b','c','d','e'][Math.round(Math.random()*2)]+'.www.toolserver.org/tiles/bw-mapnik/'+z+'/'+wrapTiles(xy.x,z)+'/'+xy.y+'.png'; }
273+
19,
274+
function(xy,z) { var n = Math.pow(2,z); return (xy.y<0 || xy.y>=n) ? null : 'http://'+['a','b','c'][Math.abs(xy.x+xy.y)%3]+'.basemaps.cartocdn.com/dark_all/'+z+'/'+wrapTiles(xy.x,z)+'/'+xy.y+'.png'; }
275275
],
276276
osm_toner: [
277277
'OSM Toner',
278278
'Stamen.org Toner',
279279
1,
280280
18,
281-
function(xy,z) { var n = Math.pow(2,z); return (xy.y<0 || xy.y>=n) ? null : 'http://'+['a','b','c','d'][Math.round(Math.random()*2)]+'.tile.stamen.com/toner/'+z+'/'+wrapTiles(xy.x,z)+'/'+xy.y+'.png'; }
281+
function(xy,z) { var n = Math.pow(2,z); return (xy.y<0 || xy.y>=n) ? null : 'http://'+['a','b','c','d'][Math.abs(xy.x+xy.y)%4]+'.tile.stamen.com/toner/'+z+'/'+wrapTiles(xy.x,z)+'/'+xy.y+'.png'; }
282282
],
283283
osm_watercolor: [
284284
'OSM Watercolor',
285285
'Stamen.org Watercolor',
286286
1,
287287
18,
288-
function(xy,z) { var n = Math.pow(2,z); return (xy.y<0 || xy.y>=n) ? null : 'http://'+['a','b','c','d'][Math.round(Math.random()*2)]+'.tile.stamen.com/watercolor/'+z+'/'+wrapTiles(xy.x,z)+'/'+xy.y+'.png'; }
288+
function(xy,z) { var n = Math.pow(2,z); return (xy.y<0 || xy.y>=n) ? null : 'http://'+['a','b','c','d'][Math.abs(xy.x+xy.y)%4]+'.tile.stamen.com/watercolor/'+z+'/'+wrapTiles(xy.x,z)+'/'+xy.y+'.png'; }
289289
]
290290
};
291291

0 commit comments

Comments
 (0)