placekitten
This commit is contained in:
parent
ad785f2cf6
commit
60c6fa8a3e
@ -20,10 +20,10 @@ Let's illustrate with a custom `L.TileLayer` that will display random kitten ima
|
|||||||
L.TileLayer.Kitten = L.TileLayer.extend({
|
L.TileLayer.Kitten = L.TileLayer.extend({
|
||||||
getTileUrl: function(coords) {
|
getTileUrl: function(coords) {
|
||||||
var i = Math.ceil( Math.random() * 4 );
|
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() {
|
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({
|
L.TileLayer.Kitten = L.TileLayer.extend({
|
||||||
getTileUrl: function(coords) {
|
getTileUrl: function(coords) {
|
||||||
var i = Math.ceil( Math.random() * 4 );
|
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() {
|
getAttribution: function() {
|
||||||
return "<a href='http://placekitten.com/attribution.html'>PlaceKitten</a>"
|
return "<a href='https://placekitten.com/attribution.html'>PlaceKitten</a>"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -13,10 +13,10 @@ title: KittenLayer
|
|||||||
L.TileLayer.Kitten = L.TileLayer.extend({
|
L.TileLayer.Kitten = L.TileLayer.extend({
|
||||||
getTileUrl: function(coords) {
|
getTileUrl: function(coords) {
|
||||||
var i = Math.ceil( Math.random() * 4 );
|
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() {
|
getAttribution: function() {
|
||||||
return "<a href='http://placekitten.com/attribution.html'>PlaceKitten</a>"
|
return "<a href='https://placekitten.com/attribution.html'>PlaceKitten</a>"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user