The QGeoTiledMapData class is a subclass of QGeoMapData provided to make working with tile based mapping services more convenient. More...
#include <QGeoTiledMapData>
Inherits QGeoMapData.
QGeoTiledMapData ( QGeoMappingManagerEngine * engine, QGraphicsGeoMap * geoMap ) | |
virtual | ~QGeoTiledMapData () |
virtual QPoint | coordinateToWorldPixel ( const QGeoCoordinate & coordinate ) const |
QPoint | maxZoomCenter () const |
QRect | maxZoomScreenRect () const |
QSize | maxZoomSize () const |
virtual QGeoCoordinate | worldPixelToCoordinate ( const QPoint & pixel ) const |
int | zoomFactor () const |
virtual QGeoCoordinate | center () const |
virtual QPointF | coordinateToScreenPosition ( const QGeoCoordinate & coordinate ) const |
virtual QList<QGeoMapObject *> | mapObjectsAtScreenPosition ( const QPointF & screenPosition ) |
virtual QList<QGeoMapObject *> | mapObjectsInScreenRect ( const QRectF & screenRect ) |
virtual void | paint ( QPainter * painter, const QStyleOptionGraphicsItem * option ) |
virtual void | pan ( int dx, int dy ) |
virtual QGeoCoordinate | screenPositionToCoordinate ( const QPointF & screenPosition ) const |
virtual void | setCenter ( const QGeoCoordinate & center ) |
virtual void | setMapType ( QGraphicsGeoMap::MapType mapType ) |
virtual void | setViewportSize ( const QSizeF & size ) |
virtual void | setZoomLevel ( qreal zoomLevel ) |
virtual QGeoMapObjectInfo * | createMapObjectInfo ( QGeoMapObject * mapObject ) |
The QGeoTiledMapData class is a subclass of QGeoMapData provided to make working with tile based mapping services more convenient.
This class assumes that at a zoom level of z the world is represented as a 2^z by 2^z grid of tiles, and that the Mercator projection is used to map back and forth between coordinate and positions on the map.
Different projections can be provided by reimplementing coordinateToWorldPixel() and worldPixelToCoordinate().
Many of the internal calculations deal with positions as though they are pixel positions on the map at the maximum zoom level. Several functions are provided which expose information about the map and the viewport onto the map in these terms for use with custom QGeoMapObjectInfo subclasses.
These functions include maxZoomCenter(), maxZoomSize() and maxZoomScreenRect().
Constructs a new tiled map data object, which stores the map data required by geoMap and makes use of the functionality provided by engine.
Destroys this tiled map data object.
Reimplemented from QGeoMapData::center().
See also setCenter().
Reimplemented from QGeoMapData::coordinateToScreenPosition().
Converts the coordinate coordinate to a pixel position on the entire map at the maximum zoom level.
The default implementation is based on the Mercator projection.
Reimplemented from QGeoMapData::createMapObjectInfo().
Reimplemented from QGeoMapData::mapObjectsAtScreenPosition().
Reimplemented from QGeoMapData::mapObjectsInScreenRect().
Returns the center of the viewport, in pixels on the entire map as a pixmap at the maximum zoom level.
Returns the visible screen rectangle, in pixels on the entire map as a pixmap at the maximum zoom level.
Returns the size, in pixels, of the entire map as a pixmap at the maximum zoom level.
Reimplemented from QGeoMapData::paint().
Reimplemented from QGeoMapData::pan().
Reimplemented from QGeoMapData::screenPositionToCoordinate().
Reimplemented from QGeoMapData::setCenter().
See also center().
Reimplemented from QGeoMapData::setMapType().
Reimplemented from QGeoMapData::setViewportSize().
Reimplemented from QGeoMapData::setZoomLevel().
Converts the pixel position pixel on the map to a coordinate.
The pixel position is relative the entire map at the maximum zoom level.
The default implementation is based on the Mercator projection.
Returns the ratio between a single pixel on the screen and a pixel on the entire map as a pixmap at the maximum zoom level.