Detailed Description
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 coordinateToWorldReferencePosition() and worldReferencePositionToCoordinate().
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 worldReferenceViewportCenter(), worldReferenceSize() and worldReferenceViewportRect().
Member Function Documentation
Constructs a new tiled map data object, which makes use of the functionality provided by engine.
QGeoTiledMapData::~QGeoTiledMapData () [virtual]
Destroys this tiled map data object.
QGeoCoordinate QGeoTiledMapData::center () const [virtual]
Reimplemented from QGeoMapData::center().
See also setCenter().
QPointF QGeoTiledMapData::coordinateToScreenPosition ( const QGeoCoordinate & coordinate ) const [virtual]
Reimplemented from QGeoMapData::coordinateToScreenPosition().
QPoint QGeoTiledMapData::coordinateToWorldReferencePosition ( const QGeoCoordinate & coordinate ) const [virtual]
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.
QGeoMapObjectInfo * QGeoTiledMapData::createMapObjectInfo ( QGeoMapObject * mapObject ) [virtual protected]
Reimplemented from QGeoMapData::createMapObjectInfo().
void QGeoTiledMapData::fitInViewport ( const QGeoBoundingBox & bounds, bool preserveViewportCenter = false ) [virtual]
Reimplemented from QGeoMapData::fitInViewport().
QList<QGeoMapObject *> QGeoTiledMapData::mapObjectsAtScreenPosition ( const QPointF & screenPosition ) const [virtual]
Reimplemented from QGeoMapData::mapObjectsAtScreenPosition().
QList<QGeoMapObject *> QGeoTiledMapData::mapObjectsInScreenRect ( const QRectF & screenRect ) const [virtual]
Reimplemented from QGeoMapData::mapObjectsInScreenRect().
void QGeoTiledMapData::paintMap ( QPainter * painter, const QStyleOptionGraphicsItem * option ) [virtual protected]
Reimplemented from QGeoMapData::paintMap().
void QGeoTiledMapData::paintObjects ( QPainter * painter, const QStyleOptionGraphicsItem * option ) [virtual protected]
Reimplemented from QGeoMapData::paintObjects().
void QGeoTiledMapData::pan ( int dx, int dy ) [virtual]
Reimplemented from QGeoMapData::pan().
QGeoCoordinate QGeoTiledMapData::screenPositionToCoordinate ( const QPointF & screenPosition ) const [virtual]
Reimplemented from QGeoMapData::screenPositionToCoordinate().
void QGeoTiledMapData::setCenter ( const QGeoCoordinate & center ) [virtual]
Reimplemented from QGeoMapData::setCenter().
See also center().
void QGeoTiledMapData::setMapType ( QGraphicsGeoMap::MapType mapType ) [virtual]
Reimplemented from QGeoMapData::setMapType().
void QGeoTiledMapData::setWindowSize ( const QSizeF & size ) [virtual]
Reimplemented from QGeoMapData::setWindowSize().
void QGeoTiledMapData::setZoomLevel ( qreal zoomLevel ) [virtual]
Reimplemented from QGeoMapData::setZoomLevel().
void QGeoTiledMapData::triggerUpdateMapDisplay ( const QRectF & target = QRectF() )
Forces the map display to update in the region specified by target.
If target is empty the entire map display will be updated.
QGeoBoundingBox QGeoTiledMapData::viewport () const [virtual]
Reimplemented from QGeoMapData::viewport().
QGeoCoordinate QGeoTiledMapData::worldReferencePositionToCoordinate ( const QPoint & pixel ) const [virtual]
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.
QSize QGeoTiledMapData::worldReferenceSize () const
Returns the size, in pixels, of the entire map as a pixmap at the maximum zoom level.
QPoint QGeoTiledMapData::worldReferenceViewportCenter () const
Returns the center of the viewport, in pixels on the entire map as a pixmap at the maximum zoom level.
QRect QGeoTiledMapData::worldReferenceViewportRect () const
Returns the visible screen rectangle, in pixels on the entire map as a pixmap at the maximum zoom level.
int QGeoTiledMapData::zoomFactor () const
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.