Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. var files=[];
  2. var mapRef=[];
  3. var overlay=[];
  4.  
  5. var listMapsRef = storageRef.child(prefix+"/listfile.txt");
  6. listMapsRef.getDownloadURL().then(function(url) {
  7. $.get(url, function(txt){
  8. files = txt.split("n");
  9. for (var i = 0; i < files.length; i++) {
  10. mapRef.push(storageRef.child(files[i]));
  11. .....
  12. .....
  13. }
  14. count = mapRef.length;
  15. mapRef.forEach(function(oneMap) {
  16. oneMap.getDownloadURL().then(function(url){
  17. ovl=loadImage(url);
  18. overlay.push(ovl);
  19. if (!--count) {
  20. startMyApp();
  21. }
  22. });
  23. });
  24.  
  25. }); //.get
  26. }); //.then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement