#include <emptymapadapter.h>
Public Member Functions | |
virtual QPoint | coordinateToDisplay (const QPointF &) const |
translates a world coordinate to display coordinate | |
int | currentZoom () const |
returns the current zoom | |
virtual QPointF | displayToCoordinate (const QPoint &) const |
translates display coordinate to world coordinate | |
EmptyMapAdapter (int tileSize=256, int minZoom=0, int maxZoom=17) | |
Constructor. | |
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 |
The EmptyMapAdapter can be used if QMapControl should not load any map tiles. This is useful if you only want to display an image through a FixedImageOverlay e.g.
EmptyMapAdapter | ( | int | tileSize = 256 , |
|
int | minZoom = 0 , |
|||
int | maxZoom = 17 | |||
) |
Constructor.
tileSize | This parameter seems unnecessary for this type of MapAdaper on first sight. But since this parameter defines the size of the offscreen image it could be used for a little performance tuning (larger offscreen-images have to be redrawed less times). | |
minZoom | the minimum zoom level | |
maxZoom | the maximum zoom level |
QPoint coordinateToDisplay | ( | const QPointF & | coordinate | ) | const [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 |
Implements MapAdapter.
int currentZoom | ( | ) | const [inherited] |
returns the current zoom
QPointF displayToCoordinate | ( | const QPoint & | point | ) | const [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 |
Implements MapAdapter.
QString host | ( | ) | const [inherited] |
int maxZoom | ( | ) | const [inherited] |
returns the max zoom value
int minZoom | ( | ) | const [inherited] |
returns the min zoom value
int tilesize | ( | ) | const [inherited] |
returns the size of the tiles