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

Using mapsforge offline maps in flutter_map #339

Closed
moovida opened this issue Jun 24, 2019 · 9 comments · Fixed by #572
Closed

Using mapsforge offline maps in flutter_map #339

moovida opened this issue Jun 24, 2019 · 9 comments · Fixed by #572

Comments

@moovida
Copy link
Contributor

moovida commented Jun 24, 2019

Hi there. While mbtiles offline maps are great for some cases, for me it is necessary to have large offline maps on my device. For this I have used the mapsforge project, which has nicely compressed OSM data files in vector format, that can be converted in tiles. Just as an info, files of huge OSM info data are around 2 Giga, so they fit on any device.

That said, recently a port of mapsforge to flutter was done: https://github.com/mikes222/mapsforge_flutter

I tried to implementa tileprovider for that (I am prototyping a port of the geopaparazzi project) and the first results look good:
image

I found a couple of issues and was wondering if I could get some information:

  1. everytime I zoom in, the first result is a blurred map. When I then pan slightly (really just to say that it did pan), the map get's sharper. Here the same region before and after:

image

  1. On low zoom values, the mapsforge engine get's very slow. This makes the map view freeze completely. I wonder if there is a way to have the tiles loaded only once they are ready. Also I am not sure how to return nothing where there are no tiles. Should I create an empty image for that?

Thanks for any info you might give me and sure thanks for this great project.

@johnpryan
Copy link
Collaborator

very cool. Do you have any more information about what might be causing the issue? Have you tried using the devtools to get a CPU or memory profile?

@moovida
Copy link
Contributor Author

moovida commented Jun 25, 2019

Hi @johnpryan to be honest I just started with flutter so I am still caching up :-)
But I will giev a look at the devtools. Can you confirm me that on the flutter_map part there should be not blocking issue when generating tiles? Just to have an idea where to look first.

@johnpryan
Copy link
Collaborator

johnpryan commented Jul 23, 2019

Yes, if you are generating tiles in Dart, that has the potential to slow down the app.

@moovida
Copy link
Contributor Author

moovida commented Jul 24, 2019

Hi @johnpryan , thanks for the reply and sorry to re-ask, there might be a language barrier problem for me :-)
I find it ok that it slows the map, like it would when asking tiles from an online service, if the service is slow. But what I am experiencing is a freeze of the map. It blocks until the tiles are loaded. And that is not acceptable. I still have not been able to learn how to profile (I will for sure as soon as I can), so maybe that will tell me. I was just wondering if I might have done an error in the provider that blocks instead of placing it in background.

@maRci002
Copy link
Contributor

maRci002 commented Apr 6, 2020

Hi, @moovida could please take a test ride with #572 PR, maybe it resolves this issue.

@8Duke8
Copy link

8Duke8 commented Jun 24, 2022

@moovida I would also like to use maps_forge offline maps in the flutter_maps. Did you manage to finish the tile provider and solve the before-mentioned issues? Or is there an easier way to use maps_forge offline maps in the flutter_maps via a plugin or something?

@8Duke8
Copy link

8Duke8 commented Jun 24, 2022

I'm struggling with deciding to switch from flutter_map to maps_forge in an offline scenario. For my project I need large offline maps https://download.mapsforge.org/maps/v5/europe/, but I would like to avoid switching to mapsforge map provider.

Any ideas on how to do it the easiest way? Ideally using the flutter_map way or custom tile provider.

@Mike-3
Copy link

Mike-3 commented Apr 26, 2023

Is there any progress? It would be great if flutter_map would also support mapsforge maps.

@JaffaKetchup
Copy link
Member

No progress as of yet, but plugins are available to use some vector tiles. We're unlikely to add this specifically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants