Map and Marker components with OSM map uploaded on sdcard device

Hello,
I have the OSM maps downloaded to the sdcard of my device. Is it possible to use the "map" and "marker" blocks? If possible, then what would be the way to call the cards?
Thanks for great ideas
Flouren2

The Map component is designed to use the OSM servers. I am not aware of any way to link the component directly to a file of OSM tiles you might have stored externally.

This is the Map components documentation. Nowhere is it described how to link a file of OSM tiles using the Map components.

Here is a way to use OSM without the Map component you might find useful.

Consider Verwendung vom (OpenAndroMaps) maps? I think they use the OSM tile model and their map system is used with offline map tiles.

If it helps:
Be aware, the Map component can access cached OpenStreetMap tiles offline ( they tiles have to have been previously accessed on line at least once in the area you wish to see a map.). An app made with the Map component caches map tiles automatically in your App Inventor Map that uses OSM. So it is possible, in some circumstances, to use the OSM tiles without accessing the OSM server.

Hello,
Thank you for your opinion. I do not know "OpenAndroMaps"; I will watch.
However, I had also thought about using the cache memory. This assumes, before offline use, to load the tiles online for a given area (approximately 200x20km) with, for example, 4 zoom levels. Before going any further, not being an expert, is it possible according to you to call the OSM map by centering it successively on various points (x, y) regularly equidistant, to put the tiles in cache memory (would remain at determine the differences between each point according to the zoom values ...)? Is there a limit for the cache memory? Are there known values for the size of the tiles for each zoom level?
That's a lot of questions ...! :thinking: Otherwise, there would be a great expert in the community to create a great extension that would solve the problem !!! :laughing: :joy:

Yes Flouren, a lot of questions. I can't answer all of them.

You have a great idea however no one can 'load' the tiles per se directly into cache as you described,
It is impossible to call the OSM map by centering (capturing a set of tiles) to put them in memory. There isn't a tool to do that.

What you can do
Use your app online and 'visit' the entire map area you are interested in at a zoom setting of 4 or at the zoom you require. Viewing the map like this by panning while online places those tiles in cache. If you panned at zoom 4, this should capture the tiles to cache at zoom 4. If you want greater detail, capture the map at other zoom levels by panning. Once you do the panning, those areas are probably in memory. I haven't experimented extensively.
How do you know the required tiles are in the cache?
Later run your Map OSM app offline without WIFI or network. If the procedure worked, you will see the cached map tiles when offline. When you are offline and move off the cached tiles while offline, the map will pixilate or disappear in those areas.

Cache Size
I don't know what the limit is.. You can see how large your cache is by going to your device Settings>Apps and selecting your map app , then selecting Storage> . What you will see will look something like this.
**osmMapCache **

The Settings screen will tell you the current cache size. If you 'scan' more map area into your map window, the cache should increase. Look at the app's properties. Experiment by adding map area at different zooms and you can tell us when caching fails.

Map Tiles
The tiles are 256 x 256 pixels
OSM Tiles
Tiles2
TileSizeCalculator

You can be that expert Flouren. Consider the above ideas and try them out. Report back here what you discover. No extension is required but if you want to create a new tool to work with a library of tiles you can join the many OSM volunteers. Use the Beginners' guide and Contribute map data to learn how to start contributing map data to the project. If you are interested in help on software development then head over to the Develop page. How to contribute will guide you how to use your skills.

1 Like