update default and plugin base maps to allow zooming up to level 21, and scale the tiles when they don't support such a resolution

This commit is contained in:
Jon Atkins
2014-05-29 01:23:25 +01:00
parent 6c35c8d238
commit a05ac61cb4
9 changed files with 22 additions and 24 deletions

View File

@ -119,11 +119,8 @@ window.setupMap = function() {
//their usage policy has no limits (except required notification above 4000 tiles/sec - we're perhaps at 50 tiles/sec based on CloudMade stats)
var mqSubdomains = [ 'otile1','otile2', 'otile3', 'otile4' ];
var mqTileUrlPrefix = window.location.protocol !== 'https:' ? 'http://{s}.mqcdn.com' : 'https://{s}-s.mqcdn.com';
var mqMapOpt = {attribution: osmAttribution+', Tiles Courtesy of MapQuest', maxZoom: 18, subdomains: mqSubdomains};
var mqMapOpt = {attribution: osmAttribution+', Tiles Courtesy of MapQuest', maxNativeZoom: 18, maxZoom: 21, subdomains: mqSubdomains};
var mqMap = new L.TileLayer(mqTileUrlPrefix+'/tiles/1.0.0/map/{z}/{x}/{y}.jpg',mqMapOpt);
//MapQuest satellite coverage outside of the US is rather limited - so not really worth having as we have google as an option
//var mqSatOpt = {attribution: 'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency', maxZoom: 18, subdomains: mqSubdomains};
//var mqSat = new L.TileLayer('http://{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg',mqSatOpt);
var ingressGMapOptions = {
backgroundColor: '#0e3d4e', //or #dddddd ? - that's the Google tile layer default
@ -140,10 +137,10 @@ window.setupMap = function() {
var views = [
/*0*/ mqMap,
/*1*/ new L.Google('ROADMAP',{maxZoom:20, mapOptions:ingressGMapOptions}),
/*2*/ new L.Google('ROADMAP',{maxZoom:20}),
/*3*/ new L.Google('SATELLITE',{maxZoom:20}),
/*4*/ new L.Google('HYBRID',{maxZoom:20}),
/*1*/ new L.Google('ROADMAP',{maxZoom:21, mapOptions:ingressGMapOptions}),
/*2*/ new L.Google('ROADMAP',{maxZoom:21}),
/*3*/ new L.Google('SATELLITE',{maxZoom:21}),
/*4*/ new L.Google('HYBRID',{maxZoom:21}),
/*5*/ new L.Google('TERRAIN',{maxZoom:15})
];