return (centerTile != temp);
}
+void MapEngine::locationItemClicked(GeoCoordinate &swBound, GeoCoordinate &neBound)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ QRect area;
+ area.setTopRight(SceneCoordinate(neBound).toPointF().toPoint());
+ area.setBottomLeft(SceneCoordinate(swBound).toPointF().toPoint());
+
+ centerAndZoomTo(area, false);
+}
+
- qreal MapEngine::sceneResolution()
- {
- qDebug() << __PRETTY_FUNCTION__;
-
- const int SHIFT = 200;
- const int KM_TO_M = 1000;
- qreal scale = (1 << (OSM_MAX_ZOOM_LEVEL - m_zoomLevel));
- GeoCoordinate centerCoordinate = centerGeoCoordinate();
- SceneCoordinate shiftedSceneCoordinate(m_sceneCoordinate.x() + SHIFT * scale,
- m_sceneCoordinate.y());
- GeoCoordinate shiftedCoordinate(shiftedSceneCoordinate);
- qreal dist = greatCircleDistance(centerCoordinate, shiftedCoordinate) * KM_TO_M;
- return (dist / SHIFT);
- }
-
void MapEngine::mapImageReceived(int zoomLevel, int x, int y, const QPixmap &image)
{
qDebug() << __PRETTY_FUNCTION__;