diff --git a/lib/QMapControl/src/googlesatmapadapter.cpp b/lib/QMapControl/src/googlesatmapadapter.cpp
index a2e3edefbe1b4d3f1e273c56c37193210e86d65f..5692b29489c36eae9c9d44ef54ed0964b5dee94a 100644
--- a/lib/QMapControl/src/googlesatmapadapter.cpp
+++ b/lib/QMapControl/src/googlesatmapadapter.cpp
@@ -29,7 +29,7 @@
namespace qmapcontrol
{
GoogleSatMapAdapter::GoogleSatMapAdapter()
- : TileMapAdapter("khm.google.com", "/kh?v=51&x=%2&s=&y=%3&z=%1", 256, 0, 18)
+ : TileMapAdapter("khm.google.com", "/kh?v=51&x=%2&s=&y=%3&z=%1", 256, 9, 21)
{
// // name = "googlesat";
//
diff --git a/lib/QMapControl/src/mapcontrol.cpp b/lib/QMapControl/src/mapcontrol.cpp
index 2872765dab8b14751d843c93fccfce9b839bcdca..c01a95e81b3f1161052edca18e3262958386849a 100644
--- a/lib/QMapControl/src/mapcontrol.cpp
+++ b/lib/QMapControl/src/mapcontrol.cpp
@@ -27,7 +27,7 @@
namespace qmapcontrol
{
MapControl::MapControl(QSize size, MouseMode mousemode)
- : size(size), mymousemode(mousemode), scaleVisible(false), cursorPosVisible(false)
+ : size(size), mymousemode(mousemode), scaleVisible(false), cursorPosVisible(false), mapPen(Qt::black)
{
layermanager = new LayerManager(this, size);
screen_middle = QPoint(size.width()/2, size.height()/2);
@@ -126,6 +126,11 @@ namespace qmapcontrol
}
}
+ void MapControl::setPen(QPen pen)
+ {
+ this->mapPen = pen;
+ }
+
void MapControl::paintEvent(QPaintEvent* evnt)
{
QWidget::paintEvent(evnt);
@@ -160,7 +165,7 @@ namespace qmapcontrol
line = distanceList.at( currentZoom() ) / pow(2.0, 18-currentZoom() ) / 0.597164;
// draw the scale
- painter.setPen(Qt::black);
+ painter.setPen(mapPen);
QPoint p1(10,size.height()-20);
QPoint p2((int)line,size.height()-20);
painter.drawLine(p1,p2);
@@ -209,7 +214,10 @@ namespace qmapcontrol
// Draw the Lat and Lon if needed
- if (cursorPosVisible) {
+
+ // FIXME Mariano
+ if (cursorPosVisible && currentZoom() < 19)
+ {
line = distanceList.at( currentZoom() ) / pow(2.0, 18-currentZoom() ) / 0.597164;
QString str;
@@ -336,6 +344,9 @@ namespace qmapcontrol
void MapControl::setZoom(int zoomlevel)
{
layermanager->setZoom(zoomlevel);
+
+ qDebug() << "MAPCONTROL: Set zoomlevel to:" << zoomlevel << "at " << __FILE__ << __LINE__;
+
update();
}
int MapControl::currentZoom() const
diff --git a/lib/QMapControl/src/mapcontrol.h b/lib/QMapControl/src/mapcontrol.h
index d0d434e1bbe3bdb1a86787b1c149982ddcaf458b..db790f48fdec98bc4e310504a2e1a1d34463c0cf 100644
--- a/lib/QMapControl/src/mapcontrol.h
+++ b/lib/QMapControl/src/mapcontrol.h
@@ -222,6 +222,13 @@ namespace qmapcontrol
*/
void showCoord ( bool show );
+ //! Set the pen for overlay text
+ /*!
+ *
+ * @param pen The new QPen
+ */
+ void setPen(QPen pen);
+
private:
LayerManager* layermanager;
QPoint screen_middle; // middle of the widget (half size)
@@ -239,6 +246,7 @@ namespace qmapcontrol
MouseMode mymousemode;
bool scaleVisible;
bool cursorPosVisible;
+ QPen mapPen;
bool m_loadingFlag;
diff --git a/lib/QMapControl/src/mapnetwork.cpp b/lib/QMapControl/src/mapnetwork.cpp
index 155d9202f1029ec00851f6d1e8cddbe2e3e41c2c..7fba8ae5306055e103de8e7508b644e97f8f89b5 100644
--- a/lib/QMapControl/src/mapnetwork.cpp
+++ b/lib/QMapControl/src/mapnetwork.cpp
@@ -98,6 +98,8 @@ namespace qmapcontrol
// QGC FIXME Error is currently undetected
// TODO Error is currently undetected
//qDebug() << "NETWORK_PIXMAP_ERROR: " << ax;
+ qDebug() << "QMapControl external library: ERROR loading map:" << "width:" << pm.width() << "heigh:" << pm.height() << "at " << __FILE__ << __LINE__;
+ qDebug() << "HTML ERROR MESSAGE:" << ax << "at " << __FILE__ << __LINE__;
}
}
diff --git a/src/ui/HUD.cc b/src/ui/HUD.cc
index 90c22ae57fe383cd2be7c465f694170a27e3e8b9..1fb7c7e5e7c968b1f153a65ef55db0d73dd3cdce 100644
--- a/src/ui/HUD.cc
+++ b/src/ui/HUD.cc
@@ -194,7 +194,7 @@ HUD::~HUD()
QSize HUD::sizeHint() const
{
- return QSize(800, 600);
+ return QSize(width(), (width()*3.0f)/4);
}
void HUD::showEvent(QShowEvent* event)
diff --git a/src/ui/MainWindow.ui b/src/ui/MainWindow.ui
index c8165aea35e0cb3570a85358432334a3e21071a0..ebd66090415f8a76df209254a4bc495281d1dc0f 100644
--- a/src/ui/MainWindow.ui
+++ b/src/ui/MainWindow.ui
@@ -6,8 +6,8 @@
0
0
- 1000
- 800
+ 800
+ 500
@@ -31,14 +31,27 @@
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 200
+ 150
+
+
+