R1BBIT · NEWS

OpenStreetMap on the ESP32-P4

News

The ESP32-P4 can now display interactive OpenStreetMap tiles right on its screen, with pan, zoom, and a PSRAM tile cache for smooth movement. Drop markers at any coordinates — colored dots, icons, or your own images — and draw tracks to show routes and paths. MAP_INIT creates the map, MAP_SOURCE points it at the tile server, and MAP_MARKER pins your points of interest. It's ideal for GPS trackers, fleet displays, and location dashboards on the P4's large screen.

A full slippy map, running on a microcontroller.

MAP_INIT(1, 0, 0, 1024, 600)
MAP_SOURCE(1, "https://tile.openstreetmap.org/{z}/{x}/{y}.png")
MAP_CENTER(1, 50.1, 8.7, 6)
MAP_MARKER(1, 0, 50.11, 8.68, 0xFF6600)