diff --git a/spec/index.html b/spec/index.html
index f9a9418e8..035626fde 100644
--- a/spec/index.html
+++ b/spec/index.html
@@ -40,6 +40,7 @@
+
diff --git a/spec/suites/onAddSpec.js b/spec/suites/onAddSpec.js
new file mode 100644
index 000000000..c0e8493b5
--- /dev/null
+++ b/spec/suites/onAddSpec.js
@@ -0,0 +1,37 @@
+describe('onAdd', function () {
+ var map, div;
+ beforeEach(function () {
+ div = document.createElement('div');
+ div.style.width = '200px';
+ div.style.height = '200px';
+ document.body.appendChild(div);
+
+ map = L.map(div);
+
+ map.fitBounds(new L.LatLngBounds([
+ [1, 1],
+ [2, 2]
+ ]));
+ });
+ afterEach(function () {
+ document.body.removeChild(div);
+ });
+
+
+ it('throws an error if maxZoom is not specified', function () {
+
+ var group = new L.MarkerClusterGroup();
+ var marker = new L.Marker([1.5, 1.5]);
+
+ group.addLayer(marker);
+
+ var ex = null;
+ try {
+ map.addLayer(group);
+ } catch (e) {
+ ex = e;
+ }
+
+ expect(ex).to.not.be(null);
+ });
+});
\ No newline at end of file
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 80b06528b..cc5a1b894 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -370,6 +370,10 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._map = map;
var i, l, layer;
+ if (!isFinite(this._map.getMaxZoom())) {
+ throw "Map has no maxZoom specified";
+ }
+
this._featureGroup.onAdd(map);
this._nonPointGroup.onAdd(map);