Created
April 18, 2014 19:21
-
-
Save keyz182/11060286 to your computer and use it in GitHub Desktop.
Demo code for https://github.com/keyz182/cordova-plugin-mbtiles/
This file contains 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
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) { | |
console.log('file system retrieved.'); | |
fs = fileSystem; | |
var dir = fs.root.getDirectory('tiles', null, function (directory) { | |
var absoluteCDVFileName = directory.toURL() + '/' + localFileName; | |
var name = 'test.mbtiles'; | |
mbTilesPlugin.open({name: name, url: absoluteCDVFileName, type: type}, success, fail); | |
}, fail); | |
},fail); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment