storymap
storymap copied to clipboard
layers variable leaks out to global scope
Looks like layers
isn't declared within the storymap.2.5.js script. Can be fixed by passing layers as a setting to the map:
$('#storymap').storymap({
layers: layers,
scenes: scenes,
And then accessing like so within storymap.2.5.js (line 292):
$.each(settings.layers, function (key, layer) {
// layer = layer.layer;
layer.layer.on('s');
layer.layer.on('load', function () {
$(".storymap-loader").fadeTo(1000, 0);
})
});```