2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Sami Rämö - sami.ramo@ixonos.com
7 Situare is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 Situare is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Situare; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
25 #include "mapengine.h"
29 MapEngine::MapEngine()
34 MapEngine::MapEngine(MapView *mapView)
37 m_mapScene = new MapScene();
38 mapView->setScene(m_mapScene);
42 void MapEngine::setViewLocation(QPointF latLonCoordinate)
44 m_mapView->setZoomLevel(m_zoomLevel);
47 * Add some dummy map tiles for demo purposes
50 for (int x=9351; x<=9354; x++) {
51 for (int y=4261; y<=4264; y++) {
52 MapTile *mapTile = new MapTile();
53 mapTile->setZoomLevel(m_zoomLevel);
54 mapTile->setTileNumber(QPoint(x, y));
55 QString fileName = QString("res/images/test_map_tiles/%1_%2_%3.png").arg(mapTile->zoomLevel()).arg(x).arg(y);
56 // qDebug() << __PRETTY_FUNCTION__ << "fileName:" << fileName;
57 mapTile->setPixmap(QPixmap(fileName));
58 m_mapScene->addMapTile(mapTile);