4 #include <QSqlDatabase>
8 class MBTilesMap
: public Map
11 MBTilesMap(const QString
&fileName
, QObject
*parent
= 0);
13 QString
name() const {return _name
;}
16 RectC
llBounds(const Projection
&) {return _bounds
;}
17 qreal
resolution(const QRectF
&rect
);
19 int zoom() const {return _zi
;}
20 void setZoom(int zoom
) {_zi
= zoom
;}
21 int zoomFit(const QSize
&size
, const RectC
&rect
);
25 QPointF
ll2xy(const Coordinates
&c
);
26 Coordinates
xy2ll(const QPointF
&p
);
28 void draw(QPainter
*painter
, const QRectF
&rect
, Flags flags
);
30 void load(const Projection
&in
, const Projection
&out
, qreal deviceRatio
,
34 bool isValid() const {return _valid
;}
35 QString
errorString() const {return _errorString
;}
37 static Map
*create(const QString
&path
, bool *isDir
);
40 qreal
tileSize() const;
41 qreal
coordinatesRatio() const;
42 qreal
imageRatio() const;
43 QByteArray
tileData(int zoom
, const QPoint
&tile
) const;
44 void drawTile(QPainter
*painter
, QPixmap
&pixmap
, QPointF
&tp
);
53 qreal _mapRatio
, _tileRatio
;
61 #endif // MBTILESMAP_H