#pragma once #include "../image/image.h" #include "init.h" #define TILE_SIZE 256 #define TILE_DL_LIMIT 250 struct mapTile { int x, y; image::Image data; mapTile(int x1, int y1, image::Image tileImage); }; struct tileMap { std::string tileServerURL; std::string tileSaveDir; int expiryTime; tileMap(std::string url = "http://tile.openstreetmap.org/{z}/{x}/{y}.png", std::string path = satdump::user_path + "/osm_tiles/", int expiry = 30); image::Image getMapImage(std::pair coor, int zoom, std::pair dim, float *progress); image::Image getMapImage(std::pair coor, std::pair coor1, int zoom, float *progress); mapTile downloadTile(std::pair t1, int zoom); std::pair coorToTile(std::pair coor, int zoom); std::pair coorToTileF(std::pair coor, int zoom); int widthToZoom(float deg, int width); };