gregallensworth / L.TileLayer.Cordova

Leaflet TileLayer subclass which caches to local filesystem, for Cordova/Phonegap
MIT License
87 stars 25 forks source link

Chrome - L.TileLayer.Cordova: device does not support requestFileSystem #12

Closed robindierckx closed 8 years ago

robindierckx commented 8 years ago

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.

gregallensworth commented 8 years ago

Chrome is not the same as Cordova. It does not support the File API in the same way, though does support a different implementation of it.

Historically, I found that protoyping in Chrome is only viable for the visual prototyping phase. The moment we need real-device code such as File API, it's time to switch to real devices. Its emulation mode, and even some of the old emulators such as ripple, really do little more than downsize the screen and introduce a GPS emulator.

robindierckx commented 8 years ago

Ok great, thanks for your clarifying answer. As I am indeed prototyping in Chrome, it would be very useful to make the plugin non-blocking in chrome: i.e., it shows the leaflet map normally, but without doing the caching. I don't know how complicated it is to adapt this.