Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't error on layers with no levels attribute

  • Loading branch information...
commit ecc284fdd4dbcf42de8d35ee18e329f895c03cb6 1 parent c4e3fa0
@ansis ansis authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  control/mm/interaction.js
View
3  control/mm/interaction.js
@@ -14,7 +14,8 @@ wax.mm.interaction = function() {
} else {
var tiles;
for (var i = 0; i < map.getLayers().length; i++) {
- var zoomLayer = map.getLayerAt(i).levels[Math.round(map.zoom())];
+ var levels = map.getLayerAt(i).levels;
+ var zoomLayer = levels && levels[Math.round(map.zoom())];
if (zoomLayer !== undefined) {
tiles = map.getLayerAt(i).tileElementsInLevel(zoomLayer);
if (tiles.length) break;
Please sign in to comment.
Something went wrong with that request. Please try again.