Like Leaflet or google maps web view, but for microcontrollers!
- Ultra effecient, works on non-PSRAM micros with minimal RAM
- Overlays for custom map elements
- Markers support for marking/updating points on the map
- GPX file reading & writing for path loading/viewing/saving
- Track simplification engine
- Supports zooming past available tiles with magnification zoom
- Platform and framework independent, runs on ESP32, desktops, etc
- Unit testable and unit tested, this repo is also runnable as a platformio project that runs unit tests
For platformio projects it's easy!
lib_deps =
https://github.com/t413/NavBoxLib.gitTraditional embedded tile renderers: 4 × 256×256 tiles, RGB565 is 2-bytes = 524 KB RAM
NavBoxLib: Without PSRAM it only stores visible portions of tiles. ~80–180 KB
This is the primary backbone of my NavBox offline GPS firmware for the ESP32. Check out that project for a full example!
Unit tests each demo realistic uses of each compodent and parts working together, check them out!
#include <navboxlib/MapRenderer.h>
MapRenderer map;
void main() {
// <lvgl setup>
map.begin(baseLvglObj, 300, 200, "/maps/tiles/%d/%d/%d.png");
map.setCenter(TrackPoint(37.871, -122.317), 16);
// <lvgl loop>
}Map tiles are standard unmodified OpenStreetMap 256x256 tiles, documentation here. You can bach download tiles:
-
Using my python tool osm2edgetx from the command line
-
Download the lastest version and run something like:
cd /Volumes/SD_CARD_PATH/maps/osm/ python osm2edgetx.py --osm . --fetch "37.87,-122.32" --radius 5 --zoom 17
-
-
Using my AlphaMap Web Tile Downloader designed for my AlphaMapLua project. It downloads the same tiles, though into
WIDGETS/AlphaMapLua/tiles.
This project is GPLv3. The hope is to encourage other open source embedded projects.
If adoption/AI-rewriting becomes an issue the license may be changed to LGPL. Any contributions are with this possible relicense in mind, and the decision ultimately stays with the original developer.
