Skip to content
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

[FEATURE] [v5.0.0] General Questions & Ideas #56

Closed
paul-gdy opened this issue Jul 3, 2022 · 6 comments
Closed

[FEATURE] [v5.0.0] General Questions & Ideas #56

paul-gdy opened this issue Jul 3, 2022 · 6 comments
Assignees
Labels
feature This issue requests a new feature

Comments

@paul-gdy
Copy link

paul-gdy commented Jul 3, 2022

Hi

I have implemented the v5 in my project and it looks great on android and ios.

However here are some questions / suggestions :

  • #31 is present, but solved with PaintingBinding.instance?.imageCache?.clear();
  • Headers should be implemented as in flutter_map, maybe : await httpClient.get(Uri.parse(url), headers: options.tileProvider.headers); in image_provider.dart.
  • The bulk download requires several permissions for its dependencies (background_fetch, battery_info, connectivity_plus, flutter_local_notifications). Would it be possible to split flutter_map_tile_catching between the cache manager and the bulk download and thus avoid these dependencies if they are not useful ?
  • In my project I would like to display a map and a layer. Is it possible to have 2 FMTC.instance based on 2 different stores ? Is there a trick to implement this ?

Thanks

@paul-gdy paul-gdy added the feature This issue requests a new feature label Jul 3, 2022
@JaffaKetchup
Copy link
Owner

JaffaKetchup commented Jul 3, 2022

Hi there, glad to hear it's working for you.

  • Using this method is the correct workaround, but not recommended, as this will reload all the images in your app.
  • Headers in this package will be implemented after 'User-Agent' Header Generation & More fleaflet/flutter_map#1294 is merged. I will also implement a custom 'User-Agent', something along the lines of 'flutter_map/flutter_map_tile_caching (<packageName>)'.
  • This could be a possibility, however, I'm not sure I'm willing to do this. It would be harder to maintain and more things to update when other packages are updated.
  • It is possible to use two stores at once, although using them on the map at the same time may cause problems (I think someone raised this issue to me, but I can't remember where). Using two roots is currently not easily possible, without using initialise every time you need to change it.

If you have any more questions, let me know!

@JaffaKetchup JaffaKetchup changed the title About v5 [FEATURE] [v5.0.0] General Questions & Ideas Jul 3, 2022
@paul-gdy
Copy link
Author

paul-gdy commented Jul 4, 2022

Thank you for your answer.

I confirm that trying to access two maps at the same time (eg for a layer) is not consistent. If tiles are in different stores or in the same store.

@paul-gdy
Copy link
Author

paul-gdy commented Jul 6, 2022

As I really need to access two different maps at the same time, I have implemented flutter_cached_network_image combined with flutter_cache_manager.

I have not looked in depth at the differences with your plugin but I get similar cache implementation and management.

@paul-gdy paul-gdy closed this as completed Jul 6, 2022
@JaffaKetchup
Copy link
Owner

@paul-gdy The issue of being able to use two maps at the same time should've just been resolved!

@JaffaKetchup
Copy link
Owner

JaffaKetchup commented Jul 10, 2022

@paul-gdy Additionally, #31 has been fixed in the latest v5 branch commits!

@paul-gdy
Copy link
Author

Thank you ! I will try this soon.

gitbook-com bot pushed a commit that referenced this issue Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue requests a new feature
Projects
None yet
Development

No branches or pull requests

2 participants