Show scale on map (#1296)

* Add scale to geomap

* Add scale to geomap
This commit is contained in:
Mark Thompson 2023-07-24 07:52:30 -05:00 committed by GitHub
parent e6ad5efbb7
commit 6ae164e59b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 0 deletions

View file

@ -179,6 +179,7 @@ class GeoMap : public Widget {
MapMarkerStored store_marker(GeoMarker& marker);
private:
void draw_scale(Painter& painter);
void draw_bearing(const Point origin, const uint16_t angle, uint32_t size, const Color color);
void draw_marker(Painter& painter, const ui::Point itemPoint, const uint16_t itemAngle, const std::string itemTag, const Color color = Color::red(), const Color fontColor = Color::white(), const Color backColor = Color::black());
void draw_markers(Painter& painter);
@ -199,6 +200,7 @@ class GeoMap : public Widget {
int32_t prev_x_pos{0xFFFF}, prev_y_pos{0xFFFF};
float lat_{};
float lon_{};
float pixels_per_km{};
uint16_t angle_{};
std::string tag_{};