In my blog post Satellite Navigation Data on a Small Display I presented how to display data from an LC76G Satellite receiver.
In this post I show how the solution was extended to show the actual position on a map.
The map data is taken from OpenStreetMap and it is stored on an SD card.
For my development I used the german OpenstreetMap map tiles in zoom level 16 in the area from north west of Mannheim to south east of Munich. These map datasets use approx. 55 GB on the SD card. In addition I added other zoom levels from level 13 to 17 for a smaller region.

Convert Map Tiles from PNG to Binary
So the first step was
- to fetch the tile data from the OpenStreetMap tile server,
- convert it to a binary format and
- store it on an SD card.
This was done using my GitHub project elrebo-de/compile_binary_map_tiles.
It uses a Python script to fetch PNG map tiles from an OpenStreetMap tile server, convert it to binary and store it in a local directory.
Important:
- You have to choose the right OpenStreetMap tile server to get he right layout for your purpose and
- you have to state your own mail address in parameter HEADERS, so that your requests to the OpenStreetMap tile server conform to the usage rules.
Show Map Tiles in an LVGL Widget
The second step is to load some of the map tiles into a map container and display it on the screen.
I have extended my project Satellite Navigation Data on a Small Display with a second tabview for the map data. The current version 1.1.8 shows the OpenStreetMap map data when it is available in the chosen zoom level for the current location on the SD card.
I am using the ESP Board Support Package for the M5STACK CORE2 V1.1 SoC. With this esp-bsp component it is easy to use the LVGL library to present the OSM data.

Leave a Reply