mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-20 12:54:33 -04: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:
parent
e1c519d71e
commit
f22808f8ca
3 changed files with 131 additions and 31 deletions
|
@ -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{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue