tesera / andbtiles Goto Github PK
View Code? Open in Web Editor NEWMBTiles caching manager and content provider
License: MIT License
MBTiles caching manager and content provider
License: MIT License
01-31 11:41:18.822 19958-19958/com.tesera.andbtiles.sample D/mali_winsys﹕ new_window_surface returns 0x3000
01-31 11:41:19.042 19958-19958/com.tesera.andbtiles.sample D/mali_winsys﹕ new_window_surface returns 0x3000
01-31 11:41:23.327 19958-20166/com.tesera.andbtiles.sample D/dalvikvm﹕ GC_FOR_ALLOC freed 291K, 7% free 5189K/5540K, paused 12ms, total 13ms
01-31 11:41:25.577 19958-19958/com.tesera.andbtiles.sample D/dalvikvm﹕ GC_FOR_ALLOC freed 492K, 10% free 5412K/5964K, paused 11ms, total 11ms
01-31 11:41:30.697 19958-20169/com.tesera.andbtiles.sample W/FileUtils﹕ Failed to chmod(/storage/emulated/0/andtbiles/1419RMWB_Background_Dark.mbtiles): libcore.io.ErrnoException: chmod failed: EPERM (Operation not permitted)
01-31 11:41:30.702 19958-20169/com.tesera.andbtiles.sample I/SQLiteConnectionPool﹕ The connection pool for /storage/emulated/0/andtbiles/1419RMWB_Background_Dark.mbtiles has been closed but there are still 1 connections in use. They will be closed as they are released back to the pool.
01-31 11:41:33.482 448-597/? I/ActivityManager﹕ START u0 {cmp=com.tesera.andbtiles.sample/.MapActivity (has extras)} from pid 19958
01-31 11:41:33.607 19958-19958/com.tesera.andbtiles.sample D/dalvikvm﹕ GC_FOR_ALLOC freed 821K, 15% free 5379K/6260K, paused 9ms, total 10ms
01-31 11:41:33.717 19958-19958/com.tesera.andbtiles.sample D/dalvikvm﹕ GC_FOR_ALLOC freed 565K, 12% free 5545K/6260K, paused 10ms, total 10ms
01-31 11:41:33.762 19958-19958/com.tesera.andbtiles.sample D/dalvikvm﹕ GC_FOR_ALLOC freed 277K, 10% free 5788K/6416K, paused 10ms, total 10ms
01-31 11:41:36.292 19958-19958/com.tesera.andbtiles.sample E/SQLiteLog﹕ (5) database is locked
01-31 11:41:36.312 19958-19958/com.tesera.andbtiles.sample E/SQLiteDatabase﹕ Failed to open database '/storage/emulated/0/andtbiles/1419RMWB_Background_Dark.mbtiles'.
android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5): , while compiling: PRAGMA journal_mode
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:634)
at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:320)
at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:294)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:215)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:804)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:789)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694)
at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:709)
at com.tesera.andbtiles.providers.TilesContentProvider.query(TilesContentProvider.java:74)
at android.content.ContentProvider.query(ContentProvider.java:857)
at android.content.ContentProvider$Transport.query(ContentProvider.java:200)
at android.content.ContentResolver.query(ContentResolver.java:461)
at android.content.ContentResolver.query(ContentResolver.java:404)
at com.tesera.andbtiles.sample.providers.MBTilesProvider.getCenterAndZoom(MBTilesProvider.java:49)
at com.tesera.andbtiles.sample.MapActivity.onCreate(MapActivity.java:52)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
01-31 11:41:36.317 19958-19958/com.tesera.andbtiles.sample D/AndroidRuntime﹕ Shutting down VM
01-31 11:41:36.317 19958-19958/com.tesera.andbtiles.sample W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41ababa8)
01-31 11:41:36.327 19958-19958/com.tesera.andbtiles.sample E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.tesera.andbtiles.sample, PID: 19958
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tesera.andbtiles.sample/com.tesera.andbtiles.sample.MapActivity}: android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5): , while compiling: PRAGMA journal_mode
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5): , while compiling: PRAGMA journal_mode
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:634)
at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:320)
at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:294)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:215)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:804)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:789)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694)
at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:709)
at com.tesera.andbtiles.providers.TilesContentProvider.query(TilesContentProvider.java:74)
at android.content.ContentProvider.query(ContentProvider.java:857)
at android.content.ContentProvider$Transport.query(ContentProvider.java:200)
at android.content.ContentResolver.query(ContentResolver.java:461)
at android.content.ContentResolver.query(ContentResolver.java:404)
at com.tesera.andbtiles.sample.providers.MBTilesProvider.getCenterAndZoom(MBTilesProvider.java:49)
at com.tesera.andbtiles.sample.MapActivity.onCreate(MapActivity.java:52)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
01-31 11:41:36.337 448-668/? W/ActivityManager﹕ Force finishing activity com.tesera.andbtiles.sample/.MapActivity
01-31 11:41:36.337 448-668/? W/ActivityManager﹕ Force finishing activity com.tesera.andbtiles.sample/.MainActivity
01-31 11:41:36.412 448-462/? D/dalvikvm﹕ GC_FOR_ALLOC freed 1073K, 21% free 12623K/15856K, paused 60ms, total 60ms
01-31 11:41:36.417 448-462/? I/dalvikvm-heap﹕ Grow heap (frag case) to 13.464MB for 1127536-byte allocation
01-31 11:41:36.477 448-488/? D/dalvikvm﹕ GC_FOR_ALLOC freed 8K, 20% free 13715K/16960K, paused 63ms, total 63ms
01-31 11:41:36.837 448-462/? W/ActivityManager﹕ Activity pause timeout for ActivityRecord{4230ba68 u0 com.tesera.andbtiles.sample/.MapActivity t14 f}
01-31 11:41:36.917 654-654/? D/mali_winsys﹕ new_window_surface returns 0x3000
01-31 11:41:37.002 448-1819/? I/ActivityManager﹕ Killing 1256:com.google.android.talk/u0a53 (adj 15): empty #17
01-31 11:41:39.142 508-510/? D/dalvikvm﹕ GC_CONCURRENT freed 6526K, 81% free 11892K/62244K, paused 6ms+3ms, total 32ms
01-31 11:41:40.917 829-832/? D/dalvikvm﹕ GC_CONCURRENT freed 385K, 11% free 4083K/4560K, paused 1ms+2ms, total 19ms
01-31 11:41:40.917 829-1427/? E/Icing﹕ Column tag was not returned by client, refusing to index
01-31 11:41:40.952 829-1427/? E/Icing﹕ Column tag was not returned by client, refusing to index
01-31 11:41:40.967 829-1427/? E/Icing﹕ Column tag was not returned by client, refusing to index
01-31 11:41:47.002 448-462/? W/ActivityManager﹕ Activity destroy timeout for ActivityRecord{421b3ed8 u0 com.tesera.andbtiles.sample/.MainActivity t14 f}
01-31 11:41:47.002 448-462/? W/ActivityManager﹕ Activity destroy timeout for ActivityRecord{4230ba68 u0 com.tesera.andbtiles.sample/.MapActivity t14 f}
01-31 11:41:51.057 19958-19958/com.tesera.andbtiles.sample I/Process﹕ Sending signal. PID: 19958 SIG: 9
01-31 11:41:51.112 448-597/? I/ActivityManager﹕ Process com.tesera.andbtiles.sample (pid 19958) has died.
01-31 11:41:51.117 448-1819/? I/WindowState﹕ WIN DEATH: Window{4254fcf8 u0 com.tesera.andbtiles.sample/com.tesera.andbtiles.sample.MainActivity}
01-31 11:41:51.947 448-633/? I/ActivityManager﹕ START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.tesera.tractorbeam/.MainActivity bnds=[454,439][646,631]} from pid 654
01-31 11:41:52.012 448-633/? D/dalvikvm﹕ GC_FOR_ALLOC freed 1036K, 22% free 13321K/16960K, paused 49ms, total 49ms
01-31 11:41:52.052 2131-2131/com.tesera.tractorbeam D/mali_winsys﹕ new_window_surface returns 0x3000
01-31 11:41:53.697 448-478/? I/ActivityManager﹕ START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher} from pid 448
01-31 11:41:53.757 448-478/? D/dalvikvm﹕ GC_FOR_ALLOC freed 1023K, 22% free 13288K/16960K, paused 49ms, total 50ms
01-31 11:41:53.792 654-654/? D/mali_winsys﹕ new_window_surface returns 0x3000
01-31 11:41:53.802 2131-2131/com.tesera.tractorbeam W/IInputConnectionWrapper﹕ showStatusIcon on inactive InputConnection
When a tile is requested and not found andbtiles should return an empty transparent tile. see: https://github.com/tesera/Tracker-Android/blob/master/src/com/tesera/tracker/mbtiles/MBTiles.java#L215
steps:
result:
After a few seconds I am kicked back out to the map list view.
Some maps have GeoJSON data associated with them. The url is defined in the TileJSON in the data property and .geojsonp extension. The GeoJSON feature collection is wrapped in a js function in order for it to be used in a jsonp request. We need to parse the inner JSON and persist it to the file system. i.e. http://a.tiles.mapbox.com/v3/tesera.gba0h639/markers.geojsonp would be tesera.gba0h639.geojson.
story:
in order to cache different areas of interest without caching everything in between
as a application developer
i would like to be able to re-harvest a map with different extent configuration
and tiles should be appended to the existing database
scenario: (not in beam.json format)
[
{
"desc": "story 1 ny",
"map": "tesera.h7bo7ha3",
"extent": "-85.233,40.0528,-64.4029,48.8575",
"zoom": "7-8"
}
,
{
"desc": "story 1 ireland",
"map": "tesera.h7bo7ha3",
"extent": "2:14.9644,50.4925,1.3832,57.0228",
"zoom": "7-8"
}
]
In order to not have to re-enter an endpoint url overtime I want to add an internet map provider
As a user
I would like the application to remember and display a historical list of unique endpoint urls I have entered in the past
https://trello.com/c/DzM4ULjO/134-andbtiles-map-internet-provider-history-
can you persist unique tilejson url in a history list available from the add provider view immediately below the url text box and button.
Try a different approach for releasing the content resolver besides killing the process.
This is needed because we can query multiple databases withing the same provider in the sample app.
Added the storybook overlay as a full cache and the application crashes at tile 268.
01-29 11:47:29.852 3508-3610/com.tesera.andbtiles E/AndroidRuntime﹕ FATAL EXCEPTION: IntentService[HarvesterService]
Process: com.tesera.andbtiles, PID: 3508
android.database.sqlite.SQLiteConstraintException: column tile_id is not unique (code 19)
at android.database.sqlite.SQLiteConnection.nativeExecute(Native Method)
at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:555)
at android.database.sqlite.SQLiteSession.execute(SQLiteSession.java:619)
at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:44)
at com.tesera.andbtiles.services.HarvesterService.batchInsertImages(HarvesterService.java:229)
at com.tesera.andbtiles.services.HarvesterService.onHandleIntent(HarvesterService.java:106)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.