-
-
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
More Caching #19
Comments
Yes, there's been some internal discussion about using a custom NetworkImage widget instead of the default |
Just started with Flutter about 4 days ago, no experience with dart. How would I go about experimenting with a custom NetworkImage widget? If I succeed with that, I might end up trying to add PolyLine support as well. Mental health rant incoming: Started with Flutter and my project Monday, without a firm grasp of what I wanted my project to look like. By the time I posted this issue, it was basically done, minus some forms that would have been trivial in Flutter and it would have been limited in future growth because can't draw polylines on your map. So I switched to React Native. Biggest development mistake I've ever made, by far. Every single step along the way is a headache. Map doesn't work unless you set up the component tree in a very finicky way. Can't show modals or anything of that nature over the map without them screwing up. Can't use a custom view that pops up when you tap a marker without doing all sorts of finicky witchcraft (gave up on this after an hour and launched a full-screen window when someone tapped my marker). It developed a strange bug where it zoomed in and out constantly, on its own. Sometimes it just doesn't render my markers. Not to mention all the undefineds and silent failures I've been chasing because of JS. I've wasted approx. 12 hours of effort over the last few days trying to get React Native to give me anywhere close to the smooth, good-looking, and pain-free experience Flutter + your library gave me, and I'm wishing I had just extended your library for the stuff I needed instead. Depending on how easy you think adding the things I need will be, I'd love to switch back. -- Edit: I only switched because it seemed very easy to get custom tiles showing on the map and because the map library already had polyline support. Who'd have thought that was such a mistake -- 4 hrs later edit: I decided to go back to my Flutter app when loading the objects that defined my map markers randomly stopped working and sending UDP packets also continued to fail without warning or error. Here's my idea for saving map tiles if I can't figure out how to hack around in the internals of your library: use the dart HttpServer class as the provider for tiles to the map, forwarding requests to the real provider and saving the results as they come back. If I have time here in the next month or so, I'd like to look at adding PolyLine drawing, too, but that's far lower priority. When using Python I can go to the folder packages are saved to, hack around in the source code, and run again to start editing a library. Is there an equivalent folder here? Or am I getting something like .jar's that will require downloading the source and compiling? |
Ouch! Actually, @vahid-sohrabloo just added polyline support so please file issues if you need anything else or find any bugs. I haven't played around with maps + React Native maps, it's good to hear this solution works better.
you might be interested in the discussion happing here: https://github.com/apptreesoftware/flutter_map/issues/3
Good to know! This is a known issue and a another way to debug might be to use flutter_stetho |
Nono, markers not showing and UDP packets not working was in React! My Flutter experience had continued to be nothing but perfect! |
Looking forward to messing with this polyline support! Very glad to see new stuff being added and to be back to having fun developing this project. Thanks for the link to #3! I'm going to stick with my HTTP server idea though I think, that way I can share tiles easily across the WLAN when the WLAN isn't connected to Internet! |
@haydenflinner if you need polyline support, I started working on a fork (I'm going to make a PR eventually) to add encoded polyline support: https://github.com/savy-91/flutter_google_map_view It currently works already with Google Maps Directions API. |
@savy-91 what other features does that have compared to https://github.com/apptreesoftware/flutter_map/pull/9? |
Commenting on the original issue, we've been using |
|
@johnpryan Could I ask has support cache? |
@natezhengbne this package is currently using the flutter_image package here: https://github.com/apptreesoftware/flutter_map/blob/eaee6b926ba2332fe0c4d805f7ead83475112412/lib/src/layer/tile_layer.dart#L452 |
There's been some changes with how images are displayed, and there are multiple TileProviders to choose from, so I'm marking this as stale |
Is there any way I can convince my mapview to cache the images it downloads indefinitely? I'd like to be able to look at an area once and then have the tiles downloaded always available, at least until someone clear's the app's cache.
I'd also be happy with a way to supply my own custom tiles that doesn't involve hosting a webserver. Saw a technique for a React map library that involved giving a local filename to the device's filesystem instead of a URL. I doubt something like that would work as easily here, but how hard would it be for me to add?
The text was updated successfully, but these errors were encountered: