Skip to content

Commit

Permalink
http → https, in maps. Removed maps that closed. #21
Browse files Browse the repository at this point in the history
  • Loading branch information
modos189 committed Dec 10, 2018
1 parent cdb7e89 commit 8b0de52
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 71 deletions.
2 changes: 1 addition & 1 deletion code/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function createDefaultBaseMapLayers() {
// cartodb has some nice tiles too - both dark and light subtle maps - http://cartodb.com/basemaps/
// (not available over https though - not on the right domain name anyway)
var cartoAttr = '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB</a>';
var cartoUrl = 'http://{s}.basemaps.cartocdn.com/{theme}/{z}/{x}/{y}.png';
var cartoUrl = 'https://{s}.basemaps.cartocdn.com/{theme}/{z}/{x}/{y}.png';
baseLayers['CartoDB Dark Matter'] = L.tileLayer(cartoUrl,{attribution:cartoAttr,theme:'dark_all'});
baseLayers['CartoDB Positron'] = L.tileLayer(cartoUrl,{attribution:cartoAttr,theme:'light_all'});

Expand Down
4 changes: 2 additions & 2 deletions code/utils_misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ window.showPortalPosLinks = function(lat, lng, name) {
var qrcode = '<div id="qrcode"></div>';
var script = '<script>$(\'#qrcode\').qrcode({text:\'GEO:'+lat+','+lng+'\'});</script>';
var gmaps = '<a href="https://maps.google.com/maps?ll='+lat+','+lng+'&q='+lat+','+lng+'%20('+encoded_name+')">Google Maps</a>';
var bingmaps = '<a href="http://www.bing.com/maps/?v=2&cp='+lat+'~'+lng+'&lvl=16&sp=Point.'+lat+'_'+lng+'_'+encoded_name+'___">Bing Maps</a>';
var osm = '<a href="http://www.openstreetmap.org/?mlat='+lat+'&mlon='+lng+'&zoom=16">OpenStreetMap</a>';
var bingmaps = '<a href="https://www.bing.com/maps/?v=2&cp='+lat+'~'+lng+'&lvl=16&sp=Point.'+lat+'_'+lng+'_'+encoded_name+'___">Bing Maps</a>';
var osm = '<a href="https://www.openstreetmap.org/?mlat='+lat+'&mlon='+lng+'&zoom=16">OpenStreetMap</a>';
var latLng = '<span>&lt;' + lat + ',' + lng +'&gt;</span>';
dialog({
html: '<div style="text-align: center;">' + qrcode + script + gmaps + '; ' + bingmaps + '; ' + osm + '<br />' + latLng + '</div>',
Expand Down
31 changes: 2 additions & 29 deletions plugins/basemap-kartverket.user.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,8 @@
// ==UserScript==
// @id iitc-plugin-basemap-kartverket@sollie
// @name IITC plugin: Kartverket.no map tiles
// @category Map Tiles
// @category Deleted
// @version 0.1.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the color and grayscale map tiles from Kartverket.no as an optional layer.
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@

// PLUGIN START ////////////////////////////////////////////////////////


// use own namespace for plugin
window.plugin.mapTileKartverketMap = function() {};

window.plugin.mapTileKartverketMap.addLayer = function() {

// Map data from Kartverket (http://statkart.no/en/)
kartverketAttribution = 'Map data © Kartverket';
var kartverketOpt = {attribution: kartverketAttribution, maxNativeZoom: 18, maxZoom: 21, subdomains: ['opencache', 'opencache2', 'opencache3']};
var kartverketTopo2 = new L.TileLayer('http://{s}.statkart.no/gatekeeper/gk/gk.open_gmaps?layers=topo2&zoom={z}&x={x}&y={y}', kartverketOpt);
var kartverketTopo2Grayscale = new L.TileLayer('http://{s}.statkart.no/gatekeeper/gk/gk.open_gmaps?layers=topo2graatone&zoom={z}&x={x}&y={y}', kartverketOpt);

layerChooser.addBaseLayer(kartverketTopo2, "Norway Topo");
layerChooser.addBaseLayer(kartverketTopo2Grayscale, "Norway Topo Grayscale");
};

var setup = window.plugin.mapTileKartverketMap.addLayer;

// PLUGIN END //////////////////////////////////////////////////////////

@@PLUGINEND@@

// ==/UserScript==
39 changes: 2 additions & 37 deletions plugins/basemap-nokia-ovi.user.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,8 @@
// ==UserScript==
// @id iitc-plugin-nokia-ovi-maps
// @name IITC plugin: Nokia OVI maps
// @category Map Tiles
// @category Deleted
// @version 0.1.3.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add various map layers from Nokia OVI Maps.
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Nokia OVI Maps was closed.
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@

// PLUGIN START ////////////////////////////////////////////////////////

window.plugin.mapNokiaOvi = function() {};

window.plugin.mapNokiaOvi.setup = function() {
//the list of styles you'd like to see
var oviStyles = {
'normal.day': { name: "Normal", type: 'png8' },
'normal.day.grey': { name: "Normal (grey)", type: 'png8' },
'normal.day.transit': { name: "Normal (transit)", type: 'png8' },
'satellite.day': { name: "Satellite", type: 'jpg' },
'terrain.day': { name: "Terrain", type: 'png8' }, //would jpg be better?
'normal.night.grey': { name: "Normal Night (grey)", type: 'png8' },
};


var oviOpt = {attribution: 'Imagery © Nokia OVI', maxNativeZoom: 20, maxZoom: 21};

$.each(oviStyles, function(style,data) {
oviOpt['style'] = style;
oviOpt['type'] = data.type;
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);
});

};

var setup = window.plugin.mapNokiaOvi.setup;

// PLUGIN END //////////////////////////////////////////////////////////

@@PLUGINEND@@
2 changes: 1 addition & 1 deletion plugins/basemap-opencyclemap.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ window.plugin.mapTileOpenCycleMap = {
};

for(var i in layers) {
var layer = new L.TileLayer('http://{s}.tile.thunderforest.com/' + i + '/{z}/{x}/{y}.png', ocmOpt);
var layer = new L.TileLayer('https://{s}.tile.thunderforest.com/' + i + '/{z}/{x}/{y}.png', ocmOpt);
layerChooser.addBaseLayer(layer, 'Thunderforest ' + layers[i]);
}
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/basemap-stamen.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ window.plugin.mapTileStamen.addLayer = function() {
'watercolor': [ 'Watercolor', 'jpg', 1, 16 ],
};

var baseUrl = window.location.protocol == 'https:' ? 'https://stamen-tiles-{s}.a.ssl.fastly.net/' : 'http://{s}.tile.stamen.com/';
var baseUrl = 'https://stamen-tiles-{s}.a.ssl.fastly.net/';


for (var layer in types) {
Expand Down

2 comments on commit 8b0de52

@johnd0e
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@modos189
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we apply these instead?

Yes, it is planned
#2
Just I wanted everything to work in the release

Please sign in to comment.