placekitten

This commit is contained in:
Elias Ojala 2018-05-04 15:21:43 +03:00
parent ad785f2cf6
commit 60c6fa8a3e
2 changed files with 6 additions and 6 deletions

View File

@ -20,10 +20,10 @@ Let's illustrate with a custom `L.TileLayer` that will display random kitten ima
L.TileLayer.Kitten = L.TileLayer.extend({
getTileUrl: function(coords) {
var i = Math.ceil( Math.random() * 4 );
return "http://placekitten.com/256/256?image=" + i;
return "https://placekitten.com/256/256?image=" + i;
},
getAttribution: function() {
return "<a href='http://placekitten.com/attribution.html'>PlaceKitten</a>"
return "<a href='https://placekitten.com/attribution.html'>PlaceKitten</a>"
}
});
@ -46,10 +46,10 @@ For the KittenLayer, you should create a file like `L.KittenLayer.js` with:
L.TileLayer.Kitten = L.TileLayer.extend({
getTileUrl: function(coords) {
var i = Math.ceil( Math.random() * 4 );
return "http://placekitten.com/256/256?image=" + i;
return "https://placekitten.com/256/256?image=" + i;
},
getAttribution: function() {
return "<a href='http://placekitten.com/attribution.html'>PlaceKitten</a>"
return "<a href='https://placekitten.com/attribution.html'>PlaceKitten</a>"
}
});

View File

@ -13,10 +13,10 @@ title: KittenLayer
L.TileLayer.Kitten = L.TileLayer.extend({
getTileUrl: function(coords) {
var i = Math.ceil( Math.random() * 4 );
return "http://placekitten.com/256/256?image=" + i;
return "https://placekitten.com/256/256?image=" + i;
},
getAttribution: function() {
return "<a href='http://placekitten.com/attribution.html'>PlaceKitten</a>"
return "<a href='https://placekitten.com/attribution.html'>PlaceKitten</a>"
}
});