Index: MainWindow.h
===================================================================
--- MainWindow.h	(revision 9959)
+++ MainWindow.h	(working copy)
@@ -8,6 +8,7 @@
 #include <QProgressBar>
 #include <QLabel>
 
+
 class LayerDock;
 class MapDocument;
 class MapLayer;
@@ -18,6 +19,7 @@
 class DirtyDock;
 class QGPS;
 class FeaturePainter;
+class GeoImage;
 
 class MainWindow : public QMainWindow, public Ui::MainWindow
 {
Index: MainWindow.cpp
===================================================================
--- MainWindow.cpp	(revision 9959)
+++ MainWindow.cpp	(working copy)
@@ -31,6 +31,7 @@
 #include "Map/Road.h"
 #include "Map/RoadManipulations.h"
 #include "Map/TrackPoint.h"
+#include "Map/GeoImage.h"
 #include "PaintStyle/EditPaintStyle.h"
 #include "PaintStyle/PaintStyleEditor.h"
 #include "Sync/SyncOSM.h"
@@ -391,6 +392,7 @@
 	"OpenStreetMap binary format (*.osb)\n" \
 	"Noni GPSPlot format (*.ngt)\n" \
 	"NMEA GPS log format (*.nmea *.nme)\n" \
+	"Geotagged images (*.jpg)\n" \
 	"All Files (*)")
 #define FILTER_IMPORT_SUPPORTED \
 	tr("Supported formats (*.gpx *.osm *.osb *.ngt *.nmea *.nme)\n" \
@@ -538,7 +540,16 @@
 		return;
 
 	QStringList fileNames(fileList);
+			
+	QStringList images = fileNames.filter(".jpg", Qt::CaseInsensitive);
+	if (!images.isEmpty()) {
+		GeoImage::loadImages(images, theDocument, theView);
+		QString cur;
+		foreach (cur, images) fileNames.removeAll(cur);
+	}
 
+	if (fileNames.isEmpty()) return;
+
 	QApplication::setOverrideCursor(Qt::BusyCursor);
 	theLayers->setUpdatesEnabled(false);
 	view()->setUpdatesEnabled(false);
@@ -549,6 +560,7 @@
 	while (it.hasNext())
 	{
 		const QString & fn = it.next();
+
 		if (fn.endsWith(".mdc") == false)
 			continue;
 
Index: Merkaartor.pri
===================================================================
--- Merkaartor.pri	(revision 9959)
+++ Merkaartor.pri	(working copy)
@@ -36,6 +36,7 @@
 ./Map/Road.h \
 ./Map/RoadManipulations.h \
 ./Map/TrackPoint.h \
+./Map/GeoImage.h \
 ./Map/TrackSegment.h \
 ./MapView.h \
 ./PaintStyle/EditPaintStyle.h \
@@ -84,6 +85,7 @@
 ./Map/Road.cpp \
 ./Map/RoadManipulations.cpp \
 ./Map/TrackPoint.cpp \
+./Map/GeoImage.cpp \
 ./Map/TrackSegment.cpp \
 ./MapView.cpp \
 ./Interaction/CreateAreaInteraction.cpp \
Index: Merkaartor.pro
===================================================================
--- Merkaartor.pro	(revision 9959)
+++ Merkaartor.pro	(working copy)
@@ -109,3 +109,5 @@
     }
     QT += webkit
 }
+
+LIBS += -lexiv2
Index: Map/ImportGPX.cpp
===================================================================
--- Map/ImportGPX.cpp	(revision 9959)
+++ Map/ImportGPX.cpp	(working copy)
@@ -88,6 +88,7 @@
 		if (!t.isNull() && t.tagName() == "trkpt")
 		{
 			TrackPoint* Pt = importTrkPt(t,theDocument, theLayer, theList);
+			Pt->setParent(S);
 			if (MakeSegment)
 				S->add(Pt);
 			progress.setValue(progress.value()+1);
Index: Map/MapDocument.cpp
===================================================================
--- Map/MapDocument.cpp	(revision 9959)
+++ Map/MapDocument.cpp	(working copy)
@@ -372,8 +372,8 @@
 	QVector<MapFeature*> theFeatures;
 	for (VisibleFeatureIterator i(this); !i.isEnd(); ++i) {
 		if (!layerType)
-			theFeatures.append(i.get());
-		else
+			qDebug() << "append :)";
+		else 
 			if (i.get()->layer()->className() == *layerType)
 				theFeatures.append(i.get());
 	}
