我们正在构建phonegap应用程序,我们希望使用leaflet.js v0.5放置地图,我们尝试通过SQLitePlugin读取.mbtiles文件
https://github.com/chbrody/Cordova-SQLitePlugin
函数buildMap() { var db = window.sqlitePlugin.openDatabase("file:///sdcard/one_tile.mbtiles");document.body.removeChild(msg); var map =新L.Map('map',{ center: new L.LatLng(40.6681,-111.9364),缩放: 11 });var lyr =新L.TileLayer.MBTiles('',{maxZoom: 14,L.Map:'tms'},db);map.addLayer(Lyr)};
但是sqlitePlugin.openDatabase没有找到.mbtiles文件
发布于 2013-01-25 10:01:59
我也有同样的问题。你查过了吗?http://geospatialscott.blogspot.com/2012/04/phonegap-leaflet-tilemill-offline.html
发布于 2014-04-03 06:43:15
您可以查看fournier的Cordova插件,该插件可以从盒子中读取MBTiles瓷砖:https://github.com/ffournier/cordova-plugin-mbtiles
https://stackoverflow.com/questions/14462029
复制相似问题