nokia basemap: change satellite imagery to use jpg rather than png - makes more sense!

This commit is contained in:
Jon Atkins 2014-05-11 19:33:02 +01:00
parent 236c47fa03
commit e9943a0a81

View File

@ -2,7 +2,7 @@
// @id iitc-plugin-nokia-ovi-maps // @id iitc-plugin-nokia-ovi-maps
// @name IITC plugin: Nokia OVI maps // @name IITC plugin: Nokia OVI maps
// @category Map Tiles // @category Map Tiles
// @version 0.1.0.@@DATETIMEVERSION@@ // @version 0.1.1.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@ // @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@ // @downloadURL @@DOWNLOADURL@@
@ -23,20 +23,21 @@ window.plugin.mapNokiaOvi = function() {};
window.plugin.mapNokiaOvi.setup = function() { window.plugin.mapNokiaOvi.setup = function() {
//the list of styles you'd like to see //the list of styles you'd like to see
var oviStyles = { var oviStyles = {
'normal.day': "Normal", 'normal.day': { name: "Normal", type: 'png8' },
'normal.day.grey': "Normal (grey)", 'normal.day.grey': { name: "Normal (grey)", type: 'png8' },
'normal.day.transit': "Normal (transit)", 'normal.day.transit': { name: "Normal (transit)", type: 'png8' },
'satellite.day': "Satellite", 'satellite.day': { name: "Satellite", type: 'jpg' },
'terrain.day': "Terrain", 'terrain.day': { name: "Terrain", type: 'png8' } //would jpg be better?
}; };
var oviOpt = {attribution: 'Imagery © Nokia OVI', maxZoom: 20}; var oviOpt = {attribution: 'Imagery © Nokia OVI', maxZoom: 20};
$.each(oviStyles, function(key,value) { $.each(oviStyles, function(style,data) {
oviOpt['style'] = key; oviOpt['style'] = style;
var oviMap = new L.TileLayer('http://maptile.maps.svc.ovi.com/maptiler/maptile/newest/{style}/{z}/{x}/{y}/256/png8', oviOpt); oviOpt['type'] = data.type;
layerChooser.addBaseLayer(oviMap, 'Nokia OVI '+value); var oviMap = new L.TileLayer('http://{s}.maptile.maps.svc.ovi.com/maptiler/maptile/newest/{style}/{z}/{x}/{y}/256/{type}', oviOpt);
layerChooser.addBaseLayer(oviMap, 'Nokia OVI '+data.name);
}); });
}; };