#include <mapadapter.h>
Public Member Functions | |
virtual QPoint | coordinateToDisplay (const QPointF &coordinate) const =0 |
translates a world coordinate to display coordinate | |
int | currentZoom () const |
returns the current zoom | |
virtual QPointF | displayToCoordinate (const QPoint &point) const =0 |
translates display coordinate to world coordinate | |
QString | host () const |
returns the host of this MapAdapter | |
int | maxZoom () const |
returns the max zoom value | |
int | minZoom () const |
returns the min zoom value | |
int | tilesize () const |
returns the size of the tiles |
MapAdapters are needed to convert between world- and display coordinates. This calculations depend on the used map projection. There are two ready-made MapAdapters:
MapAdapters are also needed to form the HTTP-Queries to load the map tiles. The maps from WMS Servers are also divided into tiles, because those can be better cached.
virtual QPoint coordinateToDisplay | ( | const QPointF & | coordinate | ) | const [pure virtual] |
translates a world coordinate to display coordinate
The calculations also needs the current zoom. The current zoom is managed by the MapAdapter, so this is no problem. To divide model from view the current zoom should be moved to the layers.
coordinate | the world coordinate |
Implemented in EmptyMapAdapter, GoogleSatMapAdapter, TileMapAdapter, and WMSMapAdapter.
Referenced by Point::Touches().
int currentZoom | ( | ) | const |
returns the current zoom
virtual QPointF displayToCoordinate | ( | const QPoint & | point | ) | const [pure virtual] |
translates display coordinate to world coordinate
The calculations also needs the current zoom. The current zoom is managed by the MapAdapter, so this is no problem. To divide model from view the current zoom should be moved to the layers.
point | the display coordinate |
Implemented in EmptyMapAdapter, GoogleSatMapAdapter, TileMapAdapter, and WMSMapAdapter.
Referenced by Point::Touches().
QString host | ( | ) | const |
int maxZoom | ( | ) | const |
returns the max zoom value
int minZoom | ( | ) | const |
returns the min zoom value
int tilesize | ( | ) | const |
returns the size of the tiles