diff --git a/src/map/Map.js b/src/map/Map.js index d87b2457..616aed11 100644 --- a/src/map/Map.js +++ b/src/map/Map.js @@ -44,6 +44,11 @@ L.Map = L.Class.extend({ this._container = L.DomUtil.get(id); + if (this._container._leaflet) { + throw new Error("Map container is already initialized."); + } + this._container._leaflet = true; + this._initLayout(); if (L.DomEvent) {