You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
830 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __SDL_MAP_VIEW_WIDGET_HEADER__
  2. #define __SDL_MAP_VIEW_WIDGET_HEADER__
  3. #include "../core/coreWidget.h"
  4. #include "sdlmap/tile_collection.h"
  5. class sdlMapView: public sdlCoreWidget {
  6. private:
  7. int width, height;
  8. int offsetx, offsety;
  9. TileCollection tiles;
  10. protected:
  11. //void resize(int width, int height);
  12. //void update_bounds();
  13. //void render();
  14. virtual void drawBefore(SDL_Renderer* pRenderer) {};
  15. virtual void drawAfter(SDL_Renderer* pRenderer) {};
  16. public:
  17. int zoom;
  18. sdlMapView(int x, int y, int width, int height, bool decor = true, sdlCoreWidget* pParent = NULL);//(SDL_Window *window, int width, int height, int zoom);
  19. virtual ~sdlMapView();
  20. void setCenter(double lat, double lng);
  21. void moveBy(int dx, int dy);
  22. void zoomAt(int x, int y);
  23. void zoomIn();
  24. void zoomOut();
  25. };
  26. #endif