gregallensworth / l.tilelayer.cordova Goto Github PK
View Code? Open in Web Editor NEWLeaflet TileLayer subclass which caches to local filesystem, for Cordova/Phonegap
License: MIT License
Leaflet TileLayer subclass which caches to local filesystem, for Cordova/Phonegap
License: MIT License
Hi Greg, this is more of a feature request. Can you please provide an example where two or more base maps can be cached and us enough d in offline mode?
Add a method to clear the cache for a given layer
This issue is somehow related to #17
There is one scenario when the map shown with some tiles missing after the offline mode has been enabled and then orientation changes in the cordova app.
Steps to reproduce:
Another variation is the same as above but disable connectivity after step 3, open the map in offline mode, then re-enable connectivity and re-open the map again and try to change orientation. The same problem.
I notices that this problem only happens after offline mode has been enabled. I also tried to use the original leaflet lib for online mode and this lib when offline enabled and once offline has been enabled the map may show tiles missing when orientation changes. If the app is restarted all works fine (in online mode or offline mode) until offline mode is enabled, after that the map shows missing tiles in online mode.
If necessary i can provide the debuggable APK with the appropriate details to reproduce the problem.
Note that invalidateSize() or dropping the map container and re-creating it from scratch does not help. The problem still reproducible.
The demo isn't meant to be a standalone app, but could use some polish. Maybe a button to cache, one to do it again, one to clear cache, ...
Hey I'm having trouble getting tiles to load.. I'm on iOS9, im just wondering if there is an issue?
Hello,
I am quite new to ionic & cordova, so appologies if I am saying something stupid.
I installed the relevant cordova plugins, but I cannot get rid ov the following error message when running ionic serve on chrome :
L.TileLayer.Cordova: device does not support requestFileSystem
window.requestFileSystem seem to be undefined.
First test seems to show it works on tablet when running ionic run android.
Am I doing something wrong, or is the plugin not working in chrome?
Thanks.
Hi! Thanks for providing this great plugin!
I'm wondering if it is possible to use L.TileLayer.Cordova together with L.esri.TiledMapLayer? In other words, I'm wondering if it is possible to provide offline support for tiled ArcGIS service layers using this plugin?
You can read more about this layerclass here: https://esri.github.io/esri-leaflet/api-reference/layers/tiled-map-layer.html
Many thanks!
Hi
when I use "L.TileLayer.Cordova" and function imageOverlay._image.parentElement.replaceChild "_image" is not defined.
Do I something wrong. Please help me.
r.
We are trying to serve maps offline
Two options
Here's a good start for leaflet-tilelayer-cordova.d.ts
If this is something you'd like to do, let me know if a pull request is preferred.
I need to create an android/ios offline map with leaflet using cordova.
I m new to Cordova so i apologize for eventual banal mistakes.
Thanks in advance.
my stack is :
Cordova 9.0.0
Ubuntu 16
Androind Studio 3.4.1
1) test
I copied your source code, moved to /test and launched : cordova run androd, got this error :
Unable to load PlatformApi from platform. Error: Cannot find module '/var/www/html/cordova/L.TileLayer.Cordova-master-2/test/platforms/android/cordova/Api.js'
Unhandled error. (The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
i launched :
$ cordova platform remove android
$ cordova platform add android
$ cordova run android
got this error :
No target specified and no devices found, deploying to emulator
Using apk: /var/www/html/cordova/L.TileLayer.Cordova-master-2/test/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Package name: io.cordova.hellocordova
Error executing "adb -s emulator-5554 install -r "/var/www/html/cordova/L.TileLayer.Cordova-master-2/test/platforms/android/app/build/outputs/apk/debug/app-debug.apk"": adb: failed to install /var/www/html/cordova/L.TileLayer.Cordova-master-2/test/platforms/android/app/build/outputs/apk/debug/app-debug.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
2) test
So i created a brand new project + your leaflet plugin
$ cordova create offlinemaptest
$ cordova platform add android
$ cordova platform add ios
$ cordova plaftorm add browser
$ cordova plugin plugin add cordova-plugin-console
$ cordova plugin plugin add cordova-plugin-file
$ cordova plugin plugin add cordova-plugin-file-transfer
added source code on the www, added all the js and css needed assets.
App is now correctly launched on the emulator but map is not showing and if i click on Cache current (piramid) gives me "undefined" error.
Used this log for logging on abd logcat :
window.onerror = function (message, url, lineNo){ console.log('Errore: ' + message + '\n' + 'Line Number: ' + lineNo + '\n' + 'Url: ' + url); return true;}
But i get no window js error logged on logcat.
This is the logcat log
06-06 14:17:09.930 1844 2922 W WindowManager: Failed looking up window callers=com.android.server.wm.WindowManagerService.windowForClientLocked:5513 com.android.server.wm.WindowState$DeathRecipient.binderDied:2443 android.os.BinderProxy.sendDeathNotice:1193
06-06 14:17:09.981 1844 1862 W libprocessgroup: Failed to open process cgroup uid 99001 pid 5049: No such file or directory
06-06 14:17:09.981 1844 1862 E libprocessgroup: Error encountered killing process cgroup uid 99001 pid 5049: No such file or directory
06-06 14:17:09.988 1844 1867 W ActivityManager: setHasOverlayUi called on unknown pid: 5024
06-06 14:17:09.989 1844 1863 W KernelCpuProcReader: File not exist: /proc/uid_cpupower/concurrent_active_time
06-06 14:17:09.989 1844 1863 W KernelCpuProcReader: File not exist: /proc/uid_cpupower/concurrent_policy_time
06-06 14:17:09.991 1844 1860 W Looper : Slow dispatch took 123ms android.ui h=com.android.server.am.ActivityManagerService$UiHandler c=null m=53
06-06 14:17:10.102 2429 2429 W SessionLifecycleManager: Handover failed. Creating new session controller.
06-06 14:17:10.107 1691 1893 E : Couldn't opendir /data/app/vmdl674585771.tmp: No such file or directory
06-06 14:17:10.107 1691 1893 E installd: Failed to delete /data/app/vmdl674585771.tmp: No such file or directory
06-06 14:17:10.110 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.android.musicfx/.Compatibility$Receiver
06-06 14:17:10.110 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.android.vending/com.google.android.finsky.packagemanager.impl.PackageMonitorReceiverImpl$RegisteredReceiver
06-06 14:17:10.110 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.android.vending/com.google.android.finsky.instantapps.appmanagement.InstantAppRemoveMonitor
06-06 14:17:10.110 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.gms/.games.chimera.GamesSystemBroadcastReceiverProxy
06-06 14:17:10.110 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
06-06 14:17:10.110 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
06-06 14:17:10.115 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.android.musicfx/.Compatibility$Receiver
06-06 14:17:10.116 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.android.vending/com.google.android.finsky.packagemanager.impl.PackageMonitorReceiverImpl$RegisteredReceiver
06-06 14:17:10.116 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.gms/.games.chimera.GamesSystemBroadcastReceiverProxy
06-06 14:17:10.116 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.gms/.gass.chimera.PackageChangeBroadcastReceiver
06-06 14:17:10.116 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
06-06 14:17:10.116 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
06-06 14:17:10.167 2429 2429 W ThreadPoolDumper: Queue length for executor Lightweight is now 11. Perhaps some tasks are too long, or the pool is too small.
06-06 14:17:10.294 2429 5229 W LocationOracle: No location history returned by ContextManager
06-06 14:17:10.296 2254 2638 W GCoreFlp: No location to return for getLastLocation()
06-06 14:17:10.378 1844 2922 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.android.musicfx/.Compatibility$Receiver
06-06 14:17:10.379 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.apps.photos/.account.full.FetchAccountPropertiesAppUpgradeBroadcastReceiver
06-06 14:17:10.379 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.apps.photos/.account.full.SyncAccountsForLoginBroadcastReceiver
06-06 14:17:10.379 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.apps.photos/.experiments.phenotype.full.PhenotypeAppUpgradeBroadcastReceiver
06-06 14:17:10.379 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.apps.photos/.notificationchannels.AppUpdateBroadcastReceiver
06-06 14:17:10.379 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.gms/.gass.chimera.PackageChangeBroadcastReceiver
06-06 14:17:10.379 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
06-06 14:17:10.379 1844 1859 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:io.cordova.hellocordova flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
06-06 14:17:10.408 1844 1863 E BatteryExternalStatsWorker: no controller energy info supplied for wifi
06-06 14:17:10.614 2524 5244 W PeopleContactsSync: CP2 sync disabled by gservices.
06-06 14:17:10.621 2254 2638 W GCoreFlp: No location to return for getLastLocation()
06-06 14:17:10.738 2254 4264 W ctxmgr : [AclManager] No 3 for (accnt=account#-517948760#, com.google.android.gms(10009):UserVelocityProducer, vrsn=17455040, 0, 3pPkg = null , 3pMdlId = null , pid = 2254). Was: 3 for 1, account#-517948760# [CONTEXT service_id=47 ]
06-06 14:17:10.747 2254 2638 W GCoreFlp: No location to return for getLastLocation()
06-06 14:17:10.763 5205 5205 W app_process: Unexpected CPU variant for X86 using defaults: x86
06-06 14:17:10.779 5205 5205 W app_process: CheckJNI: method to register "write" not in the given class. This is slow, consider changing your RegisterNatives calls.
06-06 14:17:10.780 5205 5205 W app_process: CheckJNI: method to register "write" not in the given class. This is slow, consider changing your RegisterNatives calls.
06-06 14:17:10.780 5205 5205 W app_process: CheckJNI: method to register "write_non_chained" not in the given class. This is slow, consider changing your RegisterNatives calls.
06-06 14:17:10.780 5205 5205 W app_process: CheckJNI: method to register "write_non_chained" not in the given class. This is slow, consider changing your RegisterNatives calls.
06-06 14:17:10.813 1598 5201 E : Request requires android.permission.RECORD_AUDIO
06-06 14:17:10.813 1598 5201 E AudioPolicyIntefaceImpl: getInputForAttr permission denied: recording not allowed for uid 10031 pid 2429
06-06 14:17:10.813 1598 5201 E AudioFlinger: createRecord() checkRecordThread_l failed
06-06 14:17:10.814 2429 4922 E IAudioFlinger: createRecord returned error -22
06-06 14:17:10.814 2429 4922 E AudioRecord: AudioFlinger could not create record track, status: -22
06-06 14:17:10.814 2429 4922 E AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -22.
06-06 14:17:10.814 2429 4922 E android.media.AudioRecord: Error code -20 when initializing native AudioRecord object.
06-06 14:17:10.817 2429 4922 E ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
06-06 14:17:10.820 2429 4926 W ErrorReporter: reportError [type: 211, code: 524300]: Error reading from input stream
06-06 14:17:10.836 2429 4926 W ErrorProcessor: onFatalError, processing error from engine(4)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: com.google.android.apps.gsa.shared.speech.b.g: Error reading from input stream
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.apps.gsa.staticplugins.microdetection.d.k.a(SourceFile:91)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.apps.gsa.staticplugins.microdetection.d.l.run(Unknown Source:14)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.libraries.gsa.runner.a.a.b(SourceFile:32)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.libraries.gsa.runner.a.c.call(Unknown Source:4)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source:4)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at java.lang.Thread.run(Thread.java:764)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.apps.gsa.shared.util.concurrent.b.i.run(SourceFile:6)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: Caused by: com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 393238 | Buffer overflow, no available space.
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.apps.gsa.speech.audio.Tee.j(SourceFile:103)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.apps.gsa.speech.audio.au.read(SourceFile:2)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at java.io.InputStream.read(InputStream.java:101)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.apps.gsa.speech.audio.ao.run(SourceFile:17)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at com.google.android.apps.gsa.speech.audio.an.run(SourceFile:2)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
06-06 14:17:10.836 2429 4926 W ErrorProcessor: ... 10 more
06-06 14:17:10.839 5205 5263 E app_process: Thread attaching to non-existent runtime: Binder:5205_1
06-06 14:17:10.867 2254 2638 W GCoreFlp: No location to return for getLastLocation()
06-06 14:17:11.164 5269 5269 W va.hellocordov: Unexpected CPU variant for X86 using defaults: x86
06-06 14:17:11.314 5269 5291 E cr_VariationsUtils: Failed reading seed file "/data/user/0/io.cordova.hellocordova/app_webview/variations_seed": /data/user/0/io.cordova.hellocordova/app_webview/variations_seed (No such file or directory)
06-06 14:17:11.325 5269 5292 W cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.android.chrome, sandboxed = true
06-06 14:17:11.340 5295 5295 W dboxed_process: Unexpected CPU variant for X86 using defaults: x86
06-06 14:17:11.348 5295 5295 E dboxed_process: Not starting debugger since process cannot load the jdwp agent.
06-06 14:17:11.419 5269 5269 W va.hellocordov: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->(Landroid/content/Context;I)V (light greylist, reflection)
06-06 14:17:11.419 5269 5269 W va.hellocordov: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (light greylist, reflection)
06-06 14:17:11.419 5269 5269 W va.hellocordov: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
06-06 14:17:11.419 5269 5269 W va.hellocordov: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
06-06 14:17:11.419 5269 5269 W va.hellocordov: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
06-06 14:17:11.419 5269 5269 W va.hellocordov: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
06-06 14:17:11.419 5269 5269 W va.hellocordov: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
06-06 14:17:11.419 5269 5269 W va.hellocordov: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
06-06 14:17:11.461 5269 5314 W cr_media: Requires BLUETOOTH permission
06-06 14:17:11.523 5269 5327 E chromium: [ERROR:gl_surface_egl.cc(335)] eglChooseConfig failed with error EGL_SUCCESS
06-06 14:17:11.527 1686 1763 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
06-06 14:17:11.542 2254 2254 E BeaconBle: Missing BluetoothAdapter
06-06 14:17:11.590 5269 5327 W VideoCapabilities: Unrecognized profile 4 for video/hevc
06-06 14:17:11.599 5269 5329 W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
06-06 14:17:11.618 2254 2254 E BeaconBle: Scan couldn't start for Places
06-06 14:17:11.618 2254 2254 W Places : BLE failure while scanning - code 5
06-06 14:17:11.623 5269 5327 W cr_MediaCodecUtil: HW encoder for video/avc is not available on this device.
06-06 14:17:11.641 1686 1763 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
06-06 14:17:11.694 5269 5327 E chromium: [ERROR:gl_surface_egl.cc(335)] eglChooseConfig failed with error EGL_SUCCESS
06-06 14:17:11.768 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:11.768 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:11.836 5269 5289 W cr_CrashFileManager: /data/user/0/io.cordova.hellocordova/cache/WebView/Crash Reports does not exist or is not a directory
06-06 14:17:11.867 1686 1686 W SurfaceFlinger: couldn't log to binary event log: overflow.
06-06 14:17:11.874 1686 1686 W SurfaceFlinger: couldn't log to binary event log: overflow.
06-06 14:17:11.929 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:11.929 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.000 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.000 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.007 1686 1763 W SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen io.cordova.hellocordova#0
06-06 14:17:12.007 1686 1763 W SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen io.cordova.hellocordova#0
06-06 14:17:12.027 5295 5320 E chromium: [ERROR:budget_service.cc(145)] Unable to connect to the Mojo BudgetService.
06-06 14:17:12.066 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.114 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.170 2429 2429 W SearchService: Abort, client detached.
06-06 14:17:12.194 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.455 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.542 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.542 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.744 5269 5346 W AssetFilesystem: Asset manifest not found. Recursive copies and directory listing will be slow.
06-06 14:17:12.823 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.823 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.894 2254 2660 W Conscrypt: Could not set socket write timeout: java.net.SocketException: Socket closed
06-06 14:17:12.894 2254 2660 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@[email protected] (100700-248795830):2)
06-06 14:17:12.894 2254 2660 W Conscrypt: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.setSoWriteTimeout(:com.google.android.gms@[email protected] (100700-248795830):2)
06-06 14:17:12.942 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:12.993 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:13.014 2254 2660 W Conscrypt: Could not set socket write timeout: java.net.SocketException: Socket closed
06-06 14:17:13.014 2254 2660 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@[email protected] (100700-248795830):2)
06-06 14:17:13.014 2254 2660 W Conscrypt: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.setSoWriteTimeout(:com.google.android.gms@[email protected] (100700-248795830):2)
06-06 14:17:13.048 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:13.048 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:13.064 2254 2660 E Volley : [91] BasicNetwork.performRequest: Unexpected response code 400 for https://www.googleapis.com/placesandroid/v1/getPlaceById?key=AIzaSyAf4nrRiEKvqzlRKTncQaAXMzb3ePYHr8Y
06-06 14:17:13.068 2254 2612 W Places : {"code":400,"errors":[{"reason":"badRequest","domain":"global","message":"API key expired. Please renew the API key."}]}
06-06 14:17:13.086 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:13.086 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:13.099 2254 2612 E AsyncOperation: serviceID=65, operation=GetPlaceById
06-06 14:17:13.099 2254 2612 E AsyncOperation: OperationException[Status{statusCode=ERROR, resolution=null}]
06-06 14:17:13.099 2254 2612 E AsyncOperation: at bhsb.a(:com.google.android.gms@[email protected] (100700-248795830):1)
06-06 14:17:13.099 2254 2612 E AsyncOperation: at bhrw.a(:com.google.android.gms@[email protected] (100700-248795830):25)
06-06 14:17:13.099 2254 2612 E AsyncOperation: at aaaq.run(:com.google.android.gms@[email protected] (100700-248795830):19)
06-06 14:17:13.099 2254 2612 E AsyncOperation: at bkhm.run(:com.google.android.gms@[email protected] (100700-248795830):2)
06-06 14:17:13.099 2254 2612 E AsyncOperation: at sgs.b(:com.google.android.gms@[email protected] (100700-248795830):37)
06-06 14:17:13.099 2254 2612 E AsyncOperation: at sgs.run(:com.google.android.gms@[email protected] (100700-248795830):21)
06-06 14:17:13.099 2254 2612 E AsyncOperation: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
06-06 14:17:13.099 2254 2612 E AsyncOperation: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
06-06 14:17:13.099 2254 2612 E AsyncOperation: at smq.run(Unknown Source:7)
06-06 14:17:13.099 2254 2612 E AsyncOperation: at java.lang.Thread.run(Thread.java:764)
06-06 14:17:13.204 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:13.492 5269 5329 E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
06-06 14:17:14.038 1844 1954 E TaskPersister: File error accessing recents directory (directory doesn't exist?).
06-06 14:17:19.526 1797 1797 E netmgr : Failed to open QEMU pipe 'qemud:network': Invalid argument
06-06 14:17:19.526 1797 1797 E netmgr : WifiForwarder unable to open QEMU pipe: Invalid argument
06-06 14:17:25.401 1844 1857 E memtrack: Couldn't load memtrack module
06-06 14:17:25.401 1844 1857 W android.os.Debug: failed to get memory consumption info: -1
06-06 14:17:25.415 1844 1857 E memtrack: Couldn't load memtrack module
06-06 14:17:25.415 1844 1857 W android.os.Debug: failed to get memory consumption info: -1
06-06 14:17:27.325 1699 1707 E storaged: getDiskStats failed with result NOT_SUPPORTED and size 0
06-06 14:17:40.165 1844 1857 E memtrack: Couldn't load memtrack module
06-06 14:17:40.165 1844 1857 W android.os.Debug: failed to get memory consumption info: -1
06-06 14:17:40.184 1844 1857 E memtrack: Couldn't load memtrack module
06-06 14:17:40.184 1844 1857 W android.os.Debug: failed to get memory consumption info: -1
06-06 14:17:43.505 1844 1863 E BatteryExternalStatsWorker: no controller energy info supplied for wifi
06-06 14:17:55.022 2964 3019 W PlayCommon: [171] acly.a(1): No account for auth token provided
Go over things, document as seems necessary
Will your plugin use cached tiles while online. For instance, user is online and pans to an area that they previously visited. Will the cached tiles be pulled or are cached tiles only used when offline?
Thanks.
I tried on both platforms, cordova builds just fine for both android and ios. My cordova version is 5.2.0. Any idea where I can look for the issue?
As TMS standard force y value to be caculated in negative, this plugin is producing wrong tile number for y axis.
L.TileLayer.Cordova/leaflet-tilelayer-cordova.d.ts
Lines 24 to 25 in 8bfbda8
I think the method name on line 25 should be goOffline
In my solution i need to store tiles for offline map support. I get bounds, invoke calculateXYZListFromBounds and download tiles using downloadXYZList. Everything is fine.
However when I open the map in offline mode later, and leaflet tries to load tiles (from offline storage), some of the tiles are found and displayed on and some are not found
For example, I see a lot of errors are below
(/data/user/0/com.mobile.XXXXXXXXX/files/files/OfflineTileLayer//streetsLayer-17-30447-52707.png:1 GET file:///data/user/0/com.mobile.XXXXXX/files/files/OfflineTileLayer//streetsLayer-17-30447-52707.png net::ERR_FILE_NOT_FOUND).
I checked and the problem is that the urls generated by leaflet sometimes has different Y's
For example for the above error, the first URL created by the lib is as below (there is not URL with ...52707.png
leaflet-tilelayer-cordova.js:281 streetsLayer-17-30446-52708.png missing. Fetching.
leaflet-tilelayer-cordova.js:200 Download https://api.tiles.mapbox.com/v4/mapbox.streets/17/30446/52708.png?access_to…czgxMSIsImEiOiJjaWphMXFjOTYwMDI1dmxrcTN6d3A4b2FjIn0.xFXXKg46zAe62uJHpUkGAw => file:///data/user/0/com.mobile.boss811/files/files/OfflineTileLayer//streetsLayer-17-30446-52708.png
tickets-list.ts:639 1 / 144 = 1%
Note the difference in y - the leaflet asks for 52707 and calculateXYZListFromBounds/downloadXYZList used 52708
I use leaflet 1.0.2
Btw, if i set to calculate/download tiles for wide zoom range (for example 1-20) everything seems to be working fine but it takes too much tiles to download
Thanks you very much
Merge the working demo into the repo for demo/testing purposes.
A bit heavy, since it's a Cordova app and the lib itself is like 2 files... May be better to include the HTML/JS files and instructions to "cordova create" a demo.
getDiskUsage() would count up all files in the folder, not necessarily filtering by the filename matching the L.TileLayer's name option. As such, two L.TileLayer.Cordova instances which share the same folder but have distinct name options would have their usage "blended together"
This may have implications for Issue #1 (ability to delete tiles) if this same code is used to calculate what tiles to delete: deletion of one layer's tiles may in fact delete them for all layers.
This may be a feature if we document and expect that all tiles sharing the same folder option will share the same usage pool and deletion pool. I've been thinking about the need for a "L.TileLayer.Cordova.Manager" to handle multiple L.TileLayer.Cordova instances and tally up their disk usage, delete them all, etc. This current behavior may be exactly what we want, if it's made clear that getDiskUsage() operates on a folder and not a specific layer
In the file transfer download method error handler there is urls variable which is not defined. This causes an error when an error occurs
cordova.js:314 Uncaught ReferenceError: urls is not defined
Create multiple L.TileLayer.Cordova instances, giving them the same directory but different name, which would be pretty standard.
Run some caching e.g. with MobileMapStarter2, on a small area and tally up the file count by watching the console messages.
Now, run getDiskUsage() on each layer individually, and see that they all give back the same number -- the sum total of all layers
Looks like getDiskUsage() does not segregate the files by their prefix, and reports the count+size of all files in its directory
The same likely goes for emptyCache() that it would not segregate files, and would effectively purge cached tiles for all layers sharing the same directory
It would be nice if downloadXYZList() could have some trigger to cancel the rest of the listing. This would allow one to add a cancel button, for when the user sees "tile 2 of 32,768"
The progress callback in downloadXYZList() may be just the ticket...
Not able to generate app after adding the this plugin in our project.
I am using Outsystems ide (service studio) for integration.
What i can find out is plugin.xml file is missing.
I am new to mobile development so learning how i can create its plugin.xml, but if you can help me out by adding the same here, will be great.
I also tried to use the L.TileLayer.Cordova.js file directly in project and added all dependency like file, file transfer and cordova console plugin. then i was able to load and save tile properly on device in online mode but not able to load tile in offline mode
Hej,
is your lib usable with Ionic 2 ?
if yes, which is the process to include it ?
thanks
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.