Merge branch 'laitiju' into map
[situare] / src / map / mapengine.h
index 54acd78..5bffa13 100644 (file)
@@ -3,6 +3,7 @@
    Copyright (C) 2010  Ixonos Plc. Authors:
 
        Sami Rämö - sami.ramo@ixonos.com
+       Jussi Laitinen - jussi.laitinen@ixonos.com
 
    Situare is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    USA.
 */
 
-
-
 #ifndef MAPENGINE_H
 #define MAPENGINE_H
 
 #include <math.h>
 
+#include <QtCore>
+
 #include "mapview.h"
 #include "mapscene.h"
 
@@ -64,6 +65,28 @@ public:
     /// \param latLonCoordinate Latitude & longitude coordinates for location
     void setViewLocation(QPointF latLonCoordinate);
 
+    QPoint latLonToTile(qreal latitude, qreal longitude, int zoom);
+
+    /**
+    * @brief Transforms tile x value to longitude.
+    *
+    * @fn tileXToLongitude
+    * @param x tile x value
+    * @param zoom zoom value
+    * @return qreal longitude
+    */
+    qreal tileXToLongitude(int x, int zoom);
+
+    /**
+    * @brief Transforms tile y value to latitude.
+    *
+    * @fn tileYToLatitude
+    * @param y tile y value
+    * @param zoom zoom value
+    * @return qreal latitude
+    */
+    qreal tileYToLatitude(int y, int zoom);
+
 private slots:
     void mapImageReceived(const QUrl *url, const QPixmap *pixmap);