-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
Better Offline Mapping #798
Conversation
For addition of tile provider
To fix ''Directory' isn't a type' build error.
To fix ''appDir' isn't defined for the class 'TileLayerOptions''.
To fix 'A value of type 'bool' can't be assigned to a variable of type 'Directory''
I hadn't seen #564 before creating this pull request. Whilst that PR does look and probably function better (I'm still new to this), there is one major advantage of this PR: size. This PR adds under 30 lines of code in total. If maintainer would like this closed, I am happy to 👍. |
Any custom tile providers aren't likely to be added at this point, since you can build your own package that provides them. This keeps the core package small. Feel free to suggest any packages you would like mentioned in the README. |
I see that some people have struggled with caching tiles/improving tile load timings on the web platform. My solution was to introduce a custom TileProvider (Allows configuration of the HTTP requests, if required), and then usage of the extended_image package allowed for caching of images at the browser level (same sort of behaviour you would get with Cache-Control response headers on any website). Image Package:
Hope this helps. Cheers |
Hey @stevenv-synap, Session caching will come back in v6, so hopefully this shouldn't be necessary. There are also some other improvements to load time! There's also another caching plugin available that's a little simpler than FMTC, but less flexible. More info available on the V6 docs. |
As a follow up to issue #795, I have created this pull request. Please note the differentiation between existing caching solutions and this new solution: caches can be cleared without warning by the system, app storage can't.
I have added a new tile provider to be used as below:
This pull request adds one dependency. This PR has only been tested on an Android Pixel 3a emulator.