Latest commit fe9fdae Apr 20, 2016 @trevorpowell Update README.md
Failed to load latest commit information.
hooks Initial commit Aug 20, 2015
platforms Initial commit Aug 20, 2015
plugins Initial commit Aug 20, 2015
www Update to version 0.12.4 Jan 20, 2016
README.md Update README.md Apr 20, 2016
config.xml Initial commit Aug 20, 2015




npm install -g cordova ios-sim

Run the example

Clone the repository, add platforms for iOS and Android, add the Cordova SQLite plugin, and run app on iOS emulator.

git clone https://github.com/trevorpowell/mapbox-gl-js-cordova-offline-example.git
cd mapbox-gl-js-cordova-offline-example
cordova platform add ios
cordova platform add android
cordova plugin add https://github.com/trevorpowell/cordova-sqlite-ext.git
cordova emulate ios

Notes on use

The main thing to note is in the map style object. The "source" attribute under "layers" and the source name under "sources" must correspond to the filename of the .mbtiles file ("naturalearth" in the example). The "source-layer" attribute under "layers" should correspond to the layer name in Mapbox Studio when exporting the .mbtiles file.