mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-09 03:21:52 +00:00
Pan & Zoom-in support for GeoMap (#1172)
* Zoom-in support * Zoom-in support * Clang formatting * Clang formatting * Zoom-in support * Zoom-in support * Zoom-in support * Roll-back wrong file edited * Zoom-in support * Clang formatting * Clang formatting * Zoom-in support * Zoom-in support * Zoom-in support * Oops copy/paste error
This commit is contained in:
@@ -71,6 +71,7 @@ class GeoPos : public View {
|
||||
void set_lat(float lat);
|
||||
void set_lon(float lon);
|
||||
int32_t altitude();
|
||||
void hide_altitude();
|
||||
float lat();
|
||||
float lon();
|
||||
|
||||
@@ -157,9 +158,12 @@ class GeoMap : public Widget {
|
||||
void paint(Painter& painter) override;
|
||||
|
||||
bool on_touch(const TouchEvent event) override;
|
||||
bool on_encoder(const EncoderEvent delta) override;
|
||||
|
||||
bool init();
|
||||
void set_mode(GeoMapMode mode);
|
||||
void set_manual_panning(bool v);
|
||||
bool manual_panning();
|
||||
void move(const float lon, const float lat);
|
||||
void set_tag(std::string new_tag) {
|
||||
tag_ = new_tag;
|
||||
@@ -177,11 +181,15 @@ class GeoMap : public Widget {
|
||||
private:
|
||||
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);
|
||||
void map_zoom_line(ui::Color* buffer);
|
||||
|
||||
bool manual_panning_{false};
|
||||
GeoMapMode mode_{};
|
||||
File map_file{};
|
||||
uint16_t map_width{}, map_height{};
|
||||
int32_t map_center_x{}, map_center_y{};
|
||||
int16_t map_zoom{1};
|
||||
float lon_ratio{}, lat_ratio{};
|
||||
double map_bottom{};
|
||||
double map_world_lon{};
|
||||
|
||||
Reference in New Issue
Block a user