17,6 → 17,9 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#include "dlg_Map.h" |
#include "dlg_MapPos.h" |
|
|
#include <QDomDocument> |
#include <QFile> |
|
71,7 → 74,8 |
o_Map->addLayer(o_Route); |
|
o_Map->setZoom(17); |
o_Map->setView(QPointF(13.5,52.5)); |
// o_Map->setView(QPointF(13.5,52.5)); |
o_Map->setView(QPointF(o_Settings->Map.LastLongitude,o_Settings->Map.LastLatitude)); |
|
connect(o_Map, SIGNAL(mouseEventCoordinate(const QMouseEvent*, const QPointF)), this, SLOT(slot_Click(const QMouseEvent*, const QPointF))); |
|
291,6 → 295,9 |
{ |
sWayPoint WayPoint; |
|
o_Settings->Map.LastLongitude = x; |
o_Settings->Map.LastLatitude = y; |
|
WayPoint.Longitude = x; |
WayPoint.Latitude = y; |
// WayPoint.Time = sb_Time->value(); |
435,20 → 442,20 |
|
if (!Filename.isEmpty()) |
{ |
QFile f_Points(Filename + ".pos"); |
QFile *f_Points = new QFile(Filename + ".pos"); |
|
if (f_Points.exists()) |
if (f_Points->exists()) |
{ |
f_Points.open(QIODevice::ReadOnly | QIODevice::Text); |
f_Points->open(QIODevice::ReadOnly | QIODevice::Text); |
|
QString s_Points; |
|
while (!f_Points.atEnd()) |
while (!f_Points->atEnd()) |
{ |
s_Points.append(f_Points.readLine()); |
s_Points.append(f_Points->readLine()); |
} |
|
f_Points.close(); |
f_Points->close(); |
|
QStringList s_Pos = s_Points.split(","); |
|
457,6 → 464,33 |
o_Layer->addGeometry(fip); |
o_Map->updateRequestNew(); |
} |
else |
{ |
dlg_MapPos *f_MapPos = new dlg_MapPos(this); |
|
if (f_MapPos->exec()==QDialog::Accepted) |
{ |
QString Data = f_MapPos->get_Data(); |
|
f_Points->open(QIODevice::ReadWrite | QIODevice::Text); |
|
QTextStream out(f_Points); |
|
out.setRealNumberPrecision(9); |
|
out << Data << "\n"; |
|
f_Points->close(); |
|
QStringList s_Pos = Data.split(","); |
|
FixedImageOverlay* fip = new FixedImageOverlay(s_Pos[0].toDouble(), s_Pos[1].toDouble(), s_Pos[2].toDouble(), s_Pos[3].toDouble(), Filename); |
|
o_Layer->addGeometry(fip); |
o_Map->updateRequestNew(); |
} |
|
} |
} |
} |
|