-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data management #314
Comments
Hey, I'm trying to get this working with Ionic and Angular, have you had any luck? |
We are trying to get Caching working with Xamarin.Forms compiled to iOS and Android with no luck. It would be great if there was an example for mobile apps in Xamarin/MAUI. |
The plugin uses idb: https://github.com/jakearchibald/idb This uses Indexeddb: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API You can see the keys/data in this example: https://allartk.github.io/leaflet.offline/list.html The hardcoded db name is When you pull a tile record based on your script, you get the following objectkeys If you want to delete keys by time, you'd create an index on createdAt here: https://github.com/allartk/leaflet.offline/src/TileManager.ts
To get access to the DB, we need to expose the I made a pull request to allow future development here: #369 Once |
I’m developing an application that needs to cache the map as it is viewed to reduce server loads, and using the examples and documentation given so far I’ve got the following:
Which is basically a modified version of one of the examples to use tileLayer.offline
This works great for an individual session, but I’m struggling to understand where data is stored.
In my case, I need to apply this to an ionic application where I can save data locally, and I would need to reload the database (I assume), to “resume” the download session instead of starting from scratch every time.
That is, I want to save the map data that was loaded during a session, and then be able to load it on the next.
Is there a way to do this? And if so, where is this information stored and accessed from (loaded images/blobs, db)?
Finally, is there any method to delete the oldest storage entries by date? So far the only method I could find is modifying:
to sort tiles by date of creation, and deleting them that way, but I don’t know if that would be the recommended way.
Thanks for the excellent library btw!
The text was updated successfully, but these errors were encountered: