|
1 | 1 | # OpenStreetMap-esp32
|
2 | 2 |
|
| 3 | +[](https://app.codacy.com/gh/CelliesProjects/OpenStreetMap-esp32/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) |
| 4 | + |
3 | 5 | ## What is this
|
4 | 6 |
|
5 |
| -This library provides a [OpenStreetMap](https://www.openstreetmap.org/) (OSM) map fetching and caching system for ESP32-based devices.<br> |
| 7 | +This library provides a [OpenStreetMap](https://www.openstreetmap.org/) (OSM) map fetching and tile caching system for ESP32-based devices. |
6 | 8 | Under the hood it uses [LovyanGFX](https://github.com/lovyan03/LovyanGFX) and [PNGdec](https://github.com/bitbank2/PNGdec) to do the heavy lifting.
|
7 | 9 |
|
8 |
| -It fetches, decodes and caches OSM tiles, composes a map from these tiles and returns the map as a LGFX sprite.<br>The sprite can be pushed to the screen or used for further composing.<br>Downloaded tiles are cached in psram. |
| 10 | +A map is composed from downloaded OSM tiles and returned as a LGFX sprite. |
| 11 | +The sprite can be pushed to the screen or used for further composing. |
| 12 | +Downloaded tiles are cached in psram for reuse. |
9 | 13 |
|
10 |
| -The library should work on any ESP32 type with a bit of psram and a LovyanGFX compatible display. |
| 14 | +The library should work on any ESP32 type with psram and a LovyanGFX compatible display. |
11 | 15 |
|
12 |
| -## Copyright and license of the map data |
| 16 | +The downloaded tile cache gets large very quickly -128kB per tile- so a ESP32 with psram is required. |
13 | 17 |
|
14 |
| -The OpenstreetMap-esp32 library -this library- is licensed under the [MIT license](/license).<br> The downloaded tile data has a different license than this library. |
| 18 | + |
| 19 | +An example 320px by 240px map |
15 | 20 |
|
16 |
| -OpenStreetMap® is open data, licensed under the [Open Data Commons Open Database License (ODbL)](https://opendatacommons.org/licenses/odbl/) by the OpenStreetMap Foundation (OSMF).<br> |
17 |
| -Use of any OSMF provided service is governed by the [OSMF Terms of Use](https://osmfoundation.org/wiki/Terms_of_Use). |
| 21 | +### License differences between this library and the map data |
| 22 | + |
| 23 | +#### This library has a MIT license |
18 | 24 |
|
19 |
| -## Screenshots and example code |
| 25 | +The `OpenstreetMap-esp32` library -this library- is licensed under the [MIT license](/LICENSE). |
20 | 26 |
|
21 |
| - |
| 27 | +#### The downloaded tile data has a Open Data Commons Open Database License (ODbL) |
| 28 | + |
| 29 | +OpenStreetMap® is open data, licensed under the [Open Data Commons Open Database License (ODbL)](https://opendatacommons.org/licenses/odbl/) by the OpenStreetMap Foundation (OSMF). |
| 30 | + |
| 31 | +Use of any OSMF provided service is governed by the [OSMF Terms of Use](https://osmfoundation.org/wiki/Terms_of_Use). |
22 | 32 |
|
23 |
| -Screenshot of a 320x240 map from a esp32-s3-box-lite |
| 33 | +### Example code |
24 | 34 |
|
25 |
| -### Example code returning the default 320x240 map |
| 35 | +#### Example returning the default 320x240 map |
26 | 36 |
|
27 | 37 | ```c++
|
28 | 38 | #include <Arduino.h>
|
@@ -82,11 +92,7 @@ void loop()
|
82 | 92 | }
|
83 | 93 | ```
|
84 | 94 |
|
85 |
| - |
86 |
| - |
87 |
| -Screenshot of a 480x800 map from a esp32-8048s050 |
88 |
| - |
89 |
| -### Example code setting map resolution and cache size on RGB panel devices |
| 95 | +### Example setting map resolution and cache size on RGB panel devices |
90 | 96 |
|
91 | 97 | ```c++
|
92 | 98 | #include <Arduino.h>
|
@@ -151,8 +157,11 @@ void loop()
|
151 | 157 | delay(1000);
|
152 | 158 | }
|
153 | 159 | ```
|
| 160 | + |
| 161 | +Screenshot of a 480x800 map from a esp32-8048s050 |
| 162 | + |
| 163 | +### PlatformIO setup\ |
154 | 164 |
|
155 |
| -### PlatformIO setup |
156 | 165 | ```bash
|
157 | 166 | lib_deps =
|
158 | 167 | https://github.com/CelliesProjects/OpenStreetMap-esp32
|
|
0 commit comments