diff --git a/docs/examples/extending/extending-2-layers.md b/docs/examples/extending/extending-2-layers.md
index e447c2bfc..fb0639082 100644
--- a/docs/examples/extending/extending-2-layers.md
+++ b/docs/examples/extending/extending-2-layers.md
@@ -5,7 +5,7 @@ title: Extending Leaflet, New Layers
-This tutorial assumes you've read the [theory of Leaflet class inheritance](examples/extending/extending-1-classes.html).
+This tutorial assumes you've read the [theory of Leaflet class inheritance](./extending-1-classes.html).
In Leaflet, a "layer" is anything that moves around when the map is moved around. Before seeing how to create them from scratch, it's easier to explain how to do simple extensions.
@@ -30,7 +30,7 @@ Let's illustrate with a custom `L.TileLayer` that will display random kitten ima
L.tileLayer.kitten = function() {
return new L.TileLayer.Kitten();
}
-
+
L.tileLayer.kitten().addTo(map);
{% include frame.html url="kittenlayer.html" %}
@@ -65,7 +65,7 @@ And then, include that file when showing a map:
…
-
+
### `L.GridLayer` and DOM elements
Another extension method is `L.GridLayer.createTile()`. Where `L.TileLayer` assumes that there is a grid of images (as `
` elements), `L.GridLayer` doesn't assume that - it allows creating grids of any kind of [HTML Elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element).
@@ -82,11 +82,11 @@ An example of a custom `GridLayer` is showing the tile coordinates in a `
`.
return tile;
}
});
-
+
L.gridLayer.debugCoords = function(opts) {
return new L.GridLayer.DebugCoords(opts);
};
-
+
map.addLayer( L.gridLayer.debugCoords() );
@@ -96,11 +96,11 @@ If the element has to do some asynchronous initialization, then use the second f
var tile = document.createElement('div');
tile.innerHTML = [coords.x, coords.y, coords.z].join(', ');
tile.style.outline = '1px solid red';
-
+
setTimeout(function () {
done(null, tile); // Syntax is 'done(error, tile)'
}, 500 + Math.random() * 1500);
-
+
return tile;
}
@@ -113,19 +113,19 @@ A very basic `