D
D
Denis2017-09-29 18:14:49
Android
Denis, 2017-09-29 18:14:49

Is it possible to create files for offline maps on the phone?

Good day!
I need to make an application with offline maps.
To implement it, I want to use one of these libraries: osmbonuspack, osmdroid, mapsforge.
And now the question arose about the data source for these libraries.
The first two have online data loading and the ability to cache them, but my application needs more static data sources, since the cache can be deleted at any time.
Accordingly, it is necessary to use files with pre-rendered maps.
All three libraries offer their own or third-party utilities for this, but as I understand it, they cannot be used on a mobile device.
Tell me, how much is possible and most importantly, it is advisable to create such files on a mobile device, taking into account the fact that the application has its own server, as well as a web and desktop version of the application?
How would you recommend doing my task?
PS Here is an approximate algorithm of work that I am going to implement:
1. The server sends the coordinates of the object on the map (normal field).
2. I make a request to openstreetmap.org, I get data (osm file) of a 25X25km square (as an example) around the object from there.
3. I make a map file from this data and use it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pfg21, 2017-09-29
@lacredin

It is unlikely that the original osm data is generally not designed for fast rendering into something or the use of on-line "right out of the box", and even more so on a mobile phone. they are closer to the "sources", ie. focused on ease of editing.
they are meant to be "compiled" into a "ready-to-use" product on a large machine with a good supply of resources before use.
And so you take mapsforge, set up your server with converted maps, they are small.
option 2 download maps from download.mapsforge.org , but Chukotka 1.5 giga size suggests that the server is messing up. and so you can estimate the size of maps for the republic/region.
And you download them as needed or offer the user to pre-download offline maps for areas of interest.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question