Created
May 31, 2015 11:46
-
-
Save matallo/e0c44ec9e4e5a6b54228 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(var i = 0; i < vizjson.layers.length; ++i) { | |
var torqueIndex; | |
if (vizjson.layers[i].type === 'torque') { | |
torqueIndex = i; | |
createTorqueLayer(torqueIndex, attempt++); | |
} else { | |
cartodb.createLayer(self.map, vizjson, { layerIndex: i }) | |
.done(function(layer) { | |
self.map.addLayer(layer); | |
createTorqueLayer(torqueIndex, attempt++); | |
}).on('error', function(err) { | |
console.log("some error occurred: " + err); | |
}); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment