+/****************************************************************************
+**
+** Copyright (C) 2011 Tito Eritja Real <jtitoo@gmail.com>
+**
+** This program is free software: you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation, either version 3 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program. If not, see <http://www.gnu.org/licenses/>.
+**
+****************************************************************************/
+
#ifndef TILESMAP_H
#define TILESMAP_H
// Use the QtMobility namespace
QTM_USE_NAMESPACE
-// tile size in pixels
-const int tdim=256;
+
class TileRequest{
QDateTime dateTime;
bool save;
+ bool downloading;
int zoom;
TileRequest(){}
- TileRequest(int z, QDateTime time, bool s){
+ TileRequest(int z, QDateTime time, bool s, bool d){
dateTime=time;
save=s;
zoom=z;
+ downloading=d;
}
};
inline void setMapType(MapType m){mapType=m;}
inline MapType getMapType(){return mapType;}
+ inline bool isCacheEnabled(){return cache;}
+ inline void setIsCacheEnabled(bool value){cache=value;}
+
//inline void setLatitude(qreal lat){latitude=lat;}
inline qreal getLatitude(){return latitude;}
void updateTiles();
void updateTiles(qreal lat, qreal lng);
+ void cancelDownloading();
int downloadMaps(Track* track_p);
void downloadTiles(qreal lat, qreal lng, int zoom, int* numTiles);
void downloadWindow(int *numTiles, int zoom);
int height;
int tilesD;
+ bool cache;
qreal latitude;
qreal longitude;