</code>) in the source.</p>

<h3>Custom Layer Example</h3>

<p>Here's how a custom layer implementation usually looks:</p>

<pre><code>var MyCustomLayer = L.Class.extend({

	initialize: function (latlng) {
// save position of the layer or any options from the constructor
this._latlng = latlng;
	},

	onAdd: function (map) {
this._map = map;

// create a DOM element and put it into one of the map panes
this._el = L.DomUtil.create('div', 'my-custom-layer leaflet-zoom-hide');
map.getPanes().ov