Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java	(revision 31252)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java	(revision 31252)
@@ -0,0 +1,106 @@
+package org.openstreetmap.josm.plugins.mapillary;
+
+import org.openstreetmap.josm.data.coor.LatLon;
+
+public abstract class MapillaryAbstractImage {
+
+	/** Postion of the picture */
+	public final LatLon latLon;
+	/** Direction of the picture */
+	protected final double ca;
+	private boolean isModified = false;
+	/** Temporal position of the picture until it is uplaoded */
+	public LatLon tempLatLon;
+	/**
+	 * When the object is being dragged in the map, the temporal position is
+	 * stored here
+	 */
+	public LatLon movingLatLon;
+	/** Temporal direction of the picture until it is uplaoded */
+	protected double tempCa;
+	/**
+	 * When the object direction is being moved in the map, the temporal
+	 * direction is stored here
+	 */
+	protected double movingCa;
+
+	public MapillaryAbstractImage(double lat, double lon, double ca) {
+		this.latLon = new LatLon(lat, lon);
+		this.tempLatLon = this.latLon;
+		this.movingLatLon = this.latLon;
+		this.ca = ca;
+		this.tempCa = ca;
+		this.movingCa = ca;
+	}
+
+	/**
+	 * Returns whether the object has been modified or not.
+	 * 
+	 * @return true if the object has been modified; false otherwise.
+	 */
+	public boolean isModified() {
+		return this.isModified;
+	}
+
+	/**
+	 * Returns a LatLon object containing the coordintes of the object.
+	 * 
+	 * @return The LatLon object with the position of the object.
+	 */
+	public LatLon getLatLon() {
+		return movingLatLon;
+	}
+
+	public LatLon getTempLatLon() {
+		return tempLatLon;
+	}
+
+	/**
+	 * Moves the image temporally to another position
+	 * 
+	 * @param pos
+	 */
+	public void move(double x, double y) {
+		this.movingLatLon = new LatLon(this.tempLatLon.getY() + y,
+				this.tempLatLon.getX() + x);
+		this.isModified = true;
+	}
+
+	/**
+	 * Turns the image direction.
+	 * 
+	 * @param ca
+	 */
+	public void turn(double ca) {
+		this.movingCa = this.tempCa + ca;
+		this.isModified = true;
+	}
+
+	/**
+	 * Called when the mouse button is released, meaning that the picture has
+	 * stopped being dragged.
+	 */
+	public void stopMoving() {
+		this.tempLatLon = this.movingLatLon;
+		this.tempCa = this.movingCa;
+	}
+
+	/**
+	 * Returns the direction towards the image has been taken.
+	 * 
+	 * @return The direction of the image (0 means north and goes clockwise).
+	 */
+	public double getCa() {
+		return movingCa;
+	}
+
+	/**
+	 * Returns the last fixed direction of the object.
+	 * 
+	 * @return
+	 */
+	public double getTempCa() {
+		return tempCa;
+	}
+
+}
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java	(revision 31252)
@@ -23,7 +23,7 @@
 	public volatile static MapillaryData INSTANCE;
 
-	private final List<MapillaryImage> images;
-	private MapillaryImage selectedImage;
-	private final List<MapillaryImage> multiSelectedImages;
+	private final List<MapillaryAbstractImage> images;
+	private MapillaryAbstractImage selectedImage;
+	private final List<MapillaryAbstractImage> multiSelectedImages;
 
 	public MapillaryData() {
@@ -46,6 +46,6 @@
 	 *            The set of images to be added.
 	 */
-	public synchronized void add(List<MapillaryImage> images) {
-		for (MapillaryImage image : images) {
+	public synchronized void add(List<MapillaryAbstractImage> images) {
+		for (MapillaryAbstractImage image : images) {
 			add(image);
 		}
@@ -58,5 +58,5 @@
 	 *            The image to be added.
 	 */
-	public synchronized void add(MapillaryImage image) {
+	public synchronized void add(MapillaryAbstractImage image) {
 		if (!images.contains(image)) {
 			this.images.add(image);
@@ -72,6 +72,7 @@
 	 *            The set of images to be added.
 	 */
-	public synchronized void addWithoutUpdate(List<MapillaryImage> images) {
-		for (MapillaryImage image : images) {
+	public synchronized void addWithoutUpdate(
+			List<MapillaryAbstractImage> images) {
+		for (MapillaryAbstractImage image : images) {
 			addWithoutUpdate(image);
 		}
@@ -85,5 +86,5 @@
 	 *            The image to be added.
 	 */
-	public synchronized void addWithoutUpdate(MapillaryImage image) {
+	public synchronized void addWithoutUpdate(MapillaryAbstractImage image) {
 		if (!images.contains(image)) {
 			this.images.add(image);
@@ -103,5 +104,5 @@
 	 * @return A List object containing all images.
 	 */
-	public List<MapillaryImage> getImages() {
+	public List<MapillaryAbstractImage> getImages() {
 		return images;
 	}
@@ -112,5 +113,5 @@
 	 * @return The selected MapillaryImage object.
 	 */
-	public MapillaryImage getSelectedImage() {
+	public MapillaryAbstractImage getSelectedImage() {
 		return selectedImage;
 	}
@@ -122,9 +123,11 @@
 	 */
 	public void selectNext() {
-		if (getSelectedImage() == null)
-			return;
-		if (getSelectedImage().getSequence() == null)
-			return;
-		setSelectedImage(getSelectedImage().next());
+		if (getSelectedImage() instanceof MapillaryImage) {
+			if (getSelectedImage() == null)
+				return;
+			if (((MapillaryImage) getSelectedImage()).getSequence() == null)
+				return;
+			setSelectedImage(((MapillaryImage) getSelectedImage()).next());
+		}
 	}
 
@@ -134,9 +137,11 @@
 	 */
 	public void selectPrevious() {
-		if (getSelectedImage() == null)
-			return;
-		if (getSelectedImage().getSequence() == null)
-			throw new IllegalStateException();
-		setSelectedImage(getSelectedImage().previous());
+		if (getSelectedImage() instanceof MapillaryImage) {
+			if (getSelectedImage() == null)
+				return;
+			if (((MapillaryImage) getSelectedImage()).getSequence() == null)
+				throw new IllegalStateException();
+			setSelectedImage(((MapillaryImage) getSelectedImage()).previous());
+		}
 	}
 
@@ -149,5 +154,5 @@
 	 *            The MapillaryImage which is going to be selected
 	 */
-	public void setSelectedImage(MapillaryImage image) {
+	public void setSelectedImage(MapillaryAbstractImage image) {
 		selectedImage = image;
 		multiSelectedImages.clear();
@@ -156,17 +161,22 @@
 			MapillaryToggleDialog.getInstance().setImage(selectedImage);
 			MapillaryToggleDialog.getInstance().updateImage();
-			if (image.next() != null) {
-				new MapillaryCache(image.next().getKey(),
-						MapillaryCache.Type.THUMBNAIL).submit(this, false);
-				if (image.next().next() != null)
-					new MapillaryCache(image.next().next().getKey(),
+			if (image instanceof MapillaryImage) {
+				MapillaryImage mapillaryImage = (MapillaryImage) image;
+				if (mapillaryImage.next() != null) {
+					new MapillaryCache(mapillaryImage.next().getKey(),
 							MapillaryCache.Type.THUMBNAIL).submit(this, false);
-			}
-			if (image.previous() != null) {
-				new MapillaryCache(image.previous().getKey(),
-						MapillaryCache.Type.THUMBNAIL).submit(this, false);
-				if (image.previous().previous() != null)
-					new MapillaryCache(image.previous().previous().getKey(),
+					if (mapillaryImage.next().next() != null)
+						new MapillaryCache(mapillaryImage.next().next()
+								.getKey(), MapillaryCache.Type.THUMBNAIL)
+								.submit(this, false);
+				}
+				if (mapillaryImage.previous() != null) {
+					new MapillaryCache(mapillaryImage.previous().getKey(),
 							MapillaryCache.Type.THUMBNAIL).submit(this, false);
+					if (mapillaryImage.previous().previous() != null)
+						new MapillaryCache(mapillaryImage.previous().previous()
+								.getKey(), MapillaryCache.Type.THUMBNAIL)
+								.submit(this, false);
+				}
 			}
 		}
@@ -183,5 +193,5 @@
 	 *            The MapillaryImage object to be added.
 	 */
-	public void addMultiSelectedImage(MapillaryImage image) {
+	public void addMultiSelectedImage(MapillaryAbstractImage image) {
 		if (!this.multiSelectedImages.contains(image)) {
 			if (this.getSelectedImage() != null)
@@ -198,6 +208,6 @@
 	 * @param images
 	 */
-	public void addMultiSelectedImage(List<MapillaryImage> images) {
-		for (MapillaryImage image : images)
+	public void addMultiSelectedImage(List<MapillaryAbstractImage> images) {
+		for (MapillaryAbstractImage image : images)
 			if (!this.multiSelectedImages.contains(image)) {
 				if (this.getSelectedImage() != null)
@@ -215,5 +225,5 @@
 	 * @return
 	 */
-	public List<MapillaryImage> getMultiSelectedImages() {
+	public List<MapillaryAbstractImage> getMultiSelectedImages() {
 		return multiSelectedImages;
 	}
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java	(revision 31252)
@@ -1,5 +1,4 @@
 package org.openstreetmap.josm.plugins.mapillary;
 
-import org.openstreetmap.josm.data.coor.LatLon;
 
 /**
@@ -10,29 +9,9 @@
  * @see MapillaryData
  */
-public class MapillaryImage {
+public class MapillaryImage extends MapillaryAbstractImage {
 	/** Unique identifier of the object */
 	private final String key;
-	/** Postion of the picture */
-	public final LatLon latLon;
-	/** Direction of the picture */
-	private final double ca;
 	/** Sequence of pictures containing this */
 	private MapillarySequence sequence;
-
-	private boolean isModified = false;
-	/** Temporal position of the picture until it is uplaoded */
-	public LatLon tempLatLon;
-	/**
-	 * When the object is being dragged in the map, the temporal position is
-	 * stored here
-	 */
-	public LatLon movingLatLon;
-	/** Temporal direction of the picture until it is uplaoded */
-	private double tempCa;
-	/**
-	 * When the object direction is being moved in the map, the temporal
-	 * direction is stored here
-	 */
-	private double movingCa;
 
 	/**
@@ -49,80 +28,6 @@
 	 */
 	public MapillaryImage(String key, double lat, double lon, double ca) {
+		super(lat, lon, ca);
 		this.key = key;
-		this.latLon = new LatLon(lat, lon);
-		this.tempLatLon = this.latLon;
-		this.movingLatLon = this.latLon;
-		this.ca = ca;
-		this.tempCa = ca;
-		this.movingCa = ca;
-	}
-
-	/**
-	 * Returns whether the object has been modified or not.
-	 * 
-	 * @return true if the object has been modified; false otherwise.
-	 */
-	public boolean isModified() {
-		return this.isModified;
-	}
-
-	/**
-	 * Returns a LatLon object containing the coordintes of the object.
-	 * 
-	 * @return The LatLon object with the position of the object.
-	 */
-	public LatLon getLatLon() {
-		return movingLatLon;
-	}
-	
-	public LatLon getTempLatLon() {
-		return tempLatLon;
-	}
-
-	/**
-	 * Moves the image temporally to another position
-	 * 
-	 * @param pos
-	 */
-	public void move(double x, double y) {
-		this.movingLatLon = new LatLon(this.tempLatLon.getY() + y,
-				this.tempLatLon.getX() + x);
-		this.isModified = true;
-	}
-
-	/**
-	 * Turns the image direction.
-	 * 
-	 * @param ca
-	 */
-	public void turn(double ca) {
-		this.movingCa = this.tempCa + ca;
-		this.isModified = true;
-	}
-
-	/**
-	 * Called when the mouse button is released, meaning that the picture has
-	 * stopped being dragged.
-	 */
-	public void stopMoving() {
-		this.tempLatLon = this.movingLatLon;
-		this.tempCa = this.movingCa;
-	}
-
-	/**
-	 * Returns the direction towards the image has been taken.
-	 * 
-	 * @return The direction of the image (0 means north and goes clockwise).
-	 */
-	public double getCa() {
-		return movingCa;
-	}
-
-	/**
-	 * Returns the last fixed direction of the object.
-	 * @return
-	 */
-	public double getTempCa() {
-		return tempCa;
 	}
 
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java	(revision 31252)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java	(revision 31252)
@@ -0,0 +1,27 @@
+package org.openstreetmap.josm.plugins.mapillary;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+public class MapillaryImportedImage extends MapillaryAbstractImage {
+
+	private File file;
+	
+	public MapillaryImportedImage(double lat, double lon, double ca, File file) {
+		super(lat, lon, ca);
+		this.file = file;
+	}
+	
+	public BufferedImage getImage() {
+		try {
+			return ImageIO.read(file);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return null;
+	}
+}
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java	(revision 31252)
@@ -107,4 +107,5 @@
 		download();
 		Main.map.mapView.setActiveLayer(this);
+		Main.map.repaint();
 	}
 
@@ -125,47 +126,56 @@
 						.getInstance())
 					return;
-				MapillaryImage closest = getClosest(e.getPoint());
-				if (e.getClickCount() == 2
-						&& mapillaryData.getSelectedImage() != null
-						&& closest != null) {
-					for (MapillaryImage img : closest.getSequence().getImages()) {
-						mapillaryData.addMultiSelectedImage(img);
+				MapillaryAbstractImage closestTemp = getClosest(e.getPoint());
+				if (closestTemp instanceof MapillaryImage || closestTemp == null) {
+					MapillaryImage closest = (MapillaryImage) closestTemp;
+					if (e.getClickCount() == 2
+							&& mapillaryData.getSelectedImage() != null
+							&& closest != null) {
+						for (MapillaryAbstractImage img : closest.getSequence()
+								.getImages()) {
+							mapillaryData.addMultiSelectedImage(img);
+						}
 					}
-				}
-				this.start = e.getPoint();
-				this.lastClicked = this.closest;
-				this.closest = closest;
-				if (mapillaryData.getMultiSelectedImages().contains(closest))
-					return;
-				if (e.getModifiers() == (MouseEvent.BUTTON1_MASK | MouseEvent.CTRL_MASK)
-						&& closest != null)
-					mapillaryData.addMultiSelectedImage(closest);
-				else if (e.getModifiers() == (MouseEvent.BUTTON1_MASK | MouseEvent.SHIFT_MASK)) {
-					if (this.closest != null
-							&& this.lastClicked != null
-							&& this.closest.getSequence() == this.lastClicked
-									.getSequence()) {
-						int i = this.closest.getSequence().getImages()
-								.indexOf(this.closest);
-						int j = this.lastClicked.getSequence().getImages()
-								.indexOf(this.lastClicked);
-						if (i < j)
-							mapillaryData.addMultiSelectedImage(this.closest
-									.getSequence().getImages()
-									.subList(i, j + 1));
-						else
-							mapillaryData.addMultiSelectedImage(this.closest
-									.getSequence().getImages()
-									.subList(j, i + 1));
-					}
-				} else
-					mapillaryData.setSelectedImage(closest);
-			}
-
-			private MapillaryImage getClosest(Point clickPoint) {
+					this.start = e.getPoint();
+					this.lastClicked = this.closest;
+					this.closest = closest;
+					if (mapillaryData.getMultiSelectedImages()
+							.contains(closest))
+						return;
+					if (e.getModifiers() == (MouseEvent.BUTTON1_MASK | MouseEvent.CTRL_MASK)
+							&& closest != null)
+						mapillaryData.addMultiSelectedImage(closest);
+					else if (e.getModifiers() == (MouseEvent.BUTTON1_MASK | MouseEvent.SHIFT_MASK)) {
+						if (this.closest != null
+								&& this.lastClicked != null
+								&& this.closest.getSequence() == this.lastClicked
+										.getSequence()) {
+							int i = this.closest.getSequence().getImages()
+									.indexOf(this.closest);
+							int j = this.lastClicked.getSequence().getImages()
+									.indexOf(this.lastClicked);
+							if (i < j)
+								mapillaryData
+										.addMultiSelectedImage(new ArrayList<MapillaryAbstractImage>(
+												this.closest.getSequence()
+														.getImages()
+														.subList(i, j + 1)));
+							else
+								mapillaryData
+										.addMultiSelectedImage(new ArrayList<MapillaryAbstractImage>(
+												this.closest.getSequence()
+														.getImages()
+														.subList(j, i + 1)));
+						}
+					} else
+						mapillaryData.setSelectedImage(closest);
+				}
+			}
+
+			private MapillaryAbstractImage getClosest(Point clickPoint) {
 				double snapDistance = 10;
 				double minDistance = Double.MAX_VALUE;
-				MapillaryImage closest = null;
-				for (MapillaryImage image : mapillaryData.getImages()) {
+				MapillaryAbstractImage closest = null;
+				for (MapillaryAbstractImage image : mapillaryData.getImages()) {
 					Point imagePoint = Main.map.mapView.getPoint(image
 							.getLatLon());
@@ -193,6 +203,6 @@
 						LatLon from = Main.map.mapView.getLatLon(start.getX(),
 								start.getY());
-						for (MapillaryImage img : MapillaryData.getInstance()
-								.getMultiSelectedImages()) {
+						for (MapillaryAbstractImage img : MapillaryData
+								.getInstance().getMultiSelectedImages()) {
 							img.move(to.getX() - from.getX(),
 									to.getY() - from.getY());
@@ -204,6 +214,6 @@
 								(e.getX() - start.x), -(e.getY() - start.y)))
 								- closest.getTempCa());
-						for (MapillaryImage img : MapillaryData.getInstance()
-								.getMultiSelectedImages()) {
+						for (MapillaryAbstractImage img : MapillaryData
+								.getInstance().getMultiSelectedImages()) {
 							img.turn(Math.toDegrees(Math.atan2(
 									(e.getX() - start.x), -(e.getY() - start.y)))
@@ -234,5 +244,5 @@
 							to.getY() - from.getY()));
 				}
-				for (MapillaryImage img : mapillaryData
+				for (MapillaryAbstractImage img : mapillaryData
 						.getMultiSelectedImages()) {
 					if (img != null)
@@ -285,4 +295,5 @@
 		MapillaryData.INSTANCE = null;
 		Main.map.mapView.removeMouseListener(mouseAdapter);
+		Main.map.mapView.removeMouseMotionListener(mouseAdapter);
 		MapView.removeEditLayerChangeListener(this);
 		if (Main.map.mapView.getEditLayer() != null)
@@ -296,5 +307,5 @@
 	@Override
 	public boolean isModified() {
-		for (MapillaryImage image : mapillaryData.getImages())
+		for (MapillaryAbstractImage image : mapillaryData.getImages())
 			if (image.isModified())
 				return true;
@@ -337,34 +348,60 @@
 			}
 			g.setColor(Color.WHITE);
-			for (MapillaryImage image : mapillaryData.getImages()) {
-				Point p = mv.getPoint(image.getLatLon());
-				Point nextp;
-				if (image.getSequence() != null
-						&& image.getSequence().next(image) != null) {
-					nextp = mv.getPoint(image.getSequence().next(image)
-							.getLatLon());
-					g.drawLine(p.x, p.y, nextp.x, nextp.y);
-				}
-				ImageIcon icon;
-				if (!mapillaryData.getMultiSelectedImages().contains(image))
-					icon = MapillaryPlugin.MAP_ICON;
-				else
-					icon = MapillaryPlugin.MAP_ICON_SELECTED;
-				Image imagetemp = icon.getImage();
-				BufferedImage bi = (BufferedImage) imagetemp;
-				int width = icon.getIconWidth();
-				int height = icon.getIconHeight();
-
-				// Rotate the image
-				double rotationRequired = Math.toRadians(image.getCa());
-				double locationX = width / 2;
-				double locationY = height / 2;
-				AffineTransform tx = AffineTransform.getRotateInstance(
-						rotationRequired, locationX, locationY);
-				AffineTransformOp op = new AffineTransformOp(tx,
-						AffineTransformOp.TYPE_BILINEAR);
-
-				g.drawImage(op.filter(bi, null), p.x - (width / 2), p.y
-						- (height / 2), Main.map.mapView);
+			for (MapillaryAbstractImage imageAbs : mapillaryData.getImages()) {
+				Point p = mv.getPoint(imageAbs.getLatLon());
+				if (imageAbs instanceof MapillaryImage) {
+					MapillaryImage image = (MapillaryImage) imageAbs;
+					Point nextp;
+					if (image.getSequence() != null
+							&& image.getSequence().next(image) != null) {
+						nextp = mv.getPoint(image.getSequence().next(image)
+								.getLatLon());
+						g.drawLine(p.x, p.y, nextp.x, nextp.y);
+					}
+					ImageIcon icon;
+					if (!mapillaryData.getMultiSelectedImages().contains(image))
+						icon = MapillaryPlugin.MAP_ICON;
+					else
+						icon = MapillaryPlugin.MAP_ICON_SELECTED;
+					Image imagetemp = icon.getImage();
+					BufferedImage bi = (BufferedImage) imagetemp;
+					int width = icon.getIconWidth();
+					int height = icon.getIconHeight();
+
+					// Rotate the image
+					double rotationRequired = Math.toRadians(image.getCa());
+					double locationX = width / 2;
+					double locationY = height / 2;
+					AffineTransform tx = AffineTransform.getRotateInstance(
+							rotationRequired, locationX, locationY);
+					AffineTransformOp op = new AffineTransformOp(tx,
+							AffineTransformOp.TYPE_BILINEAR);
+
+					g.drawImage(op.filter(bi, null), p.x - (width / 2), p.y
+							- (height / 2), Main.map.mapView);
+				} else if (imageAbs instanceof MapillaryImportedImage) {
+					MapillaryImportedImage image = (MapillaryImportedImage) imageAbs;
+					ImageIcon icon;
+					if (!mapillaryData.getMultiSelectedImages().contains(image))
+						icon = MapillaryPlugin.MAP_ICON_IMPORTED;
+					else
+						icon = MapillaryPlugin.MAP_ICON_SELECTED;
+					Image imagetemp = icon.getImage();
+					BufferedImage bi = (BufferedImage) imagetemp;
+					int width = icon.getIconWidth();
+					int height = icon.getIconHeight();
+
+					// Rotate the image
+					double rotationRequired = Math.toRadians(image.getCa());
+					double locationX = width / 2;
+					double locationY = height / 2;
+					AffineTransform tx = AffineTransform.getRotateInstance(
+							rotationRequired, locationX, locationY);
+					AffineTransformOp op = new AffineTransformOp(tx,
+							AffineTransformOp.TYPE_BILINEAR);
+
+					g.drawImage(op.filter(bi, null), p.x - (width / 2), p.y
+							- (height / 2), Main.map.mapView);
+				}
 			}
 		}
@@ -397,12 +434,18 @@
 
 	private MapillaryImage[] getClosestImagesFromDifferentSequences() {
+		if (!(mapillaryData.getSelectedImage() instanceof MapillaryImage))
+			return new MapillaryImage[2];
+		MapillaryImage selected = (MapillaryImage) mapillaryData
+				.getSelectedImage();
 		MapillaryImage[] ret = new MapillaryImage[2];
 		double[] distances = { SEQUENCE_MAX_JUMP_DISTANCE,
 				SEQUENCE_MAX_JUMP_DISTANCE };
 		LatLon selectedCoords = mapillaryData.getSelectedImage().getLatLon();
-		for (MapillaryImage image : mapillaryData.getImages()) {
+		for (MapillaryAbstractImage imagePrev : mapillaryData.getImages()) {
+			if (!(imagePrev instanceof MapillaryImage))
+				continue;
+			MapillaryImage image = (MapillaryImage) imagePrev;
 			if (image.getLatLon().greatCircleDistance(selectedCoords) < SEQUENCE_MAX_JUMP_DISTANCE
-					&& mapillaryData.getSelectedImage().getSequence() != image
-							.getSequence()) {
+					&& selected.getSequence() != image.getSequence()) {
 				if ((ret[0] == null && ret[1] == null)
 						|| (image.getLatLon().greatCircleDistance(
@@ -516,7 +559,12 @@
 	@Override
 	public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-		if (newLayer == this)
-			Main.map.statusLine.setHelpText("Total images: "
-					+ MapillaryData.getInstance().getImages().size());
+		if (newLayer == this) {
+			if (MapillaryData.getInstance().getImages().size() > 0)
+				Main.map.statusLine.setHelpText(tr("Total images: ")
+						+ MapillaryData.getInstance().getImages().size());
+			else
+				Main.map.statusLine.setHelpText(tr("No images found"));
+		}
+
 	}
 
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java	(revision 31252)
@@ -29,5 +29,5 @@
  *
  */
-public class MapillaryPlugin extends Plugin implements EditLayerChangeListener{
+public class MapillaryPlugin extends Plugin implements EditLayerChangeListener {
 
 	public static final ImageIcon ICON24 = new ImageProvider("icon24.png")
@@ -39,4 +39,6 @@
 	public static final ImageIcon MAP_ICON_SELECTED = new ImageProvider(
 			"mapiconselected.png").get();
+	public static final ImageIcon MAP_ICON_IMPORTED = new ImageProvider(
+			"mapiconimported.png").get();
 	public static final int ICON_SIZE = 24;
 
@@ -45,7 +47,9 @@
 	private final MapillaryDownloadAction downloadAction;
 	private final MapillaryExportAction exportAction;
+	private final MapillaryImportAction importAction;
 
 	public static JMenuItem DOWNLOAD_MENU;
 	public static JMenuItem EXPORT_MENU;
+	public static JMenuItem IMPORT_MENU;
 
 	public MapillaryPlugin(PluginInformation info) {
@@ -53,4 +57,5 @@
 		downloadAction = new MapillaryDownloadAction();
 		exportAction = new MapillaryExportAction();
+		importAction = new MapillaryImportAction();
 
 		DOWNLOAD_MENU = MainMenu.add(Main.main.menu.imageryMenu,
@@ -58,7 +63,11 @@
 		EXPORT_MENU = MainMenu.add(Main.main.menu.fileMenu, exportAction,
 				false, 14);
+		IMPORT_MENU = MainMenu.add(Main.main.menu.fileMenu, importAction,
+				false, 14);
+
 		EXPORT_MENU.setEnabled(false);
 		DOWNLOAD_MENU.setEnabled(false);
-		
+		IMPORT_MENU.setEnabled(false);
+
 		MapView.addEditLayerChangeListener(this);
 		try {
@@ -85,5 +94,5 @@
 		menu.setEnabled(value);
 	}
-	
+
 	@Override
 	public PreferenceSetting getPreferenceSetting() {
@@ -93,8 +102,11 @@
 	@Override
 	public void editLayerChanged(OsmDataLayer oldLayer, OsmDataLayer newLayer) {
-		if (oldLayer == null && newLayer != null)
-			DOWNLOAD_MENU.setEnabled(true);		
-		else if (oldLayer != null && newLayer == null)
+		if (oldLayer == null && newLayer != null) {
+			DOWNLOAD_MENU.setEnabled(true);
+			IMPORT_MENU.setEnabled(true);
+		} else if (oldLayer != null && newLayer == null) {
 			DOWNLOAD_MENU.setEnabled(false);
+			IMPORT_MENU.setEnabled(false);
+		}
 	}
 }
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java	(revision 31252)
@@ -27,6 +27,6 @@
 	public MapillaryDownloadAction() {
 		super(tr("Mapillary"), new ImageProvider("icon24.png"),
-				tr("Create Mapillary layer."), Shortcut.registerShortcut(
-						"menu:Mapillary", tr("Menu: {0}", tr("Mapillary")),
+				tr("Create Mapillary layer"), Shortcut.registerShortcut(
+						"Mapillary", tr("Start Mapillary layer"),
 						KeyEvent.VK_M, Shortcut.ALT_CTRL_SHIFT), false,
 				"mapillaryDownload", false);
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryExportAction.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryExportAction.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryExportAction.java	(revision 31252)
@@ -5,4 +5,5 @@
 import java.awt.Dimension;
 import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
 import java.util.ArrayList;
 import java.util.List;
@@ -13,4 +14,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryData;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
@@ -18,4 +20,5 @@
 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryExportDialog;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Shortcut;
 
 /**
@@ -30,6 +33,8 @@
 
 	public MapillaryExportAction() {
-		super(tr("Export images"), new ImageProvider("icon24.png"),
-				tr("Export images."), null, false, "mapillaryExport", false);
+		super(tr("Export pictures"), new ImageProvider("icon24.png"),
+				tr("Export pictures"), Shortcut.registerShortcut(
+						"Export Mapillary", tr("Export Mapillary pictures"),
+						KeyEvent.VK_M, Shortcut.NONE), false, "mapillaryExport", false);
 	}
 
@@ -50,8 +55,12 @@
 				export(MapillaryData.getInstance().getImages());
 			} else if (dialog.group.isSelected(dialog.sequence.getModel())) {
-				ArrayList<MapillaryImage> images = new ArrayList<>();
-				for (MapillaryImage image : MapillaryData.getInstance().getMultiSelectedImages())
-					if (!images.contains(image))
-						images.addAll(image.getSequence().getImages());
+				ArrayList<MapillaryAbstractImage> images = new ArrayList<>();
+				for (MapillaryAbstractImage image : MapillaryData.getInstance().getMultiSelectedImages())
+					if (image instanceof MapillaryImage) {
+						if (!images.contains(image))
+							images.addAll(((MapillaryImage) image).getSequence().getImages());
+					}
+					else
+						images.add(image);
 				export(images);
 			} else if (dialog.group.isSelected(dialog.selected.getModel())) {
@@ -65,5 +74,5 @@
 	 * Exports the given images from the database.
 	 */
-	public void export(List<MapillaryImage> images) {
+	public void export(List<MapillaryAbstractImage> images) {
 		Main.worker.submit(new Thread(new MapillaryExportManager(images,
 				dialog.chooser.getSelectedFile().toString())));
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java	(revision 31252)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java	(revision 31252)
@@ -0,0 +1,123 @@
+package org.openstreetmap.josm.plugins.mapillary.actions;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+import java.io.File;
+import java.io.IOException;
+
+import javax.swing.JFileChooser;
+import javax.swing.filechooser.FileNameExtensionFilter;
+
+import org.apache.commons.imaging.ImageReadException;
+import org.apache.commons.imaging.Imaging;
+import org.apache.commons.imaging.common.ImageMetadata;
+import org.apache.commons.imaging.common.RationalNumber;
+import org.apache.commons.imaging.formats.jpeg.JpegImageMetadata;
+import org.apache.commons.imaging.formats.tiff.TiffField;
+import org.apache.commons.imaging.formats.tiff.constants.GpsTagConstants;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryData;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryImportedImage;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryLayer;
+import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Shortcut;
+
+public class MapillaryImportAction extends JosmAction {
+
+	public JFileChooser chooser;
+
+	public MapillaryImportAction() {
+		super(tr("Import pictures"), new ImageProvider("icon24.png"),
+				tr("Import local pictures"), Shortcut.registerShortcut(
+						"Import Mapillary",
+						tr("Import pictures into Mapillary layer"),
+						KeyEvent.VK_M, Shortcut.NONE), false,
+				"mapillaryDownload", false);
+	}
+
+	@Override
+	public void actionPerformed(ActionEvent e) {
+		chooser = new JFileChooser();
+		chooser.setCurrentDirectory(new java.io.File(System
+				.getProperty("user.home")));
+		chooser.setDialogTitle(tr("Select pictures"));
+		chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
+		chooser.setAcceptAllFileFilterUsed(false);
+		chooser.addChoosableFileFilter(new FileNameExtensionFilter("images",
+				"jpg", "jpeg", "png"));
+		chooser.setMultiSelectionEnabled(true);
+		if (chooser.showOpenDialog(Main.parent) == JFileChooser.APPROVE_OPTION) {
+			for (int i = 0; i < chooser.getSelectedFiles().length; i++) {
+				File file = chooser.getSelectedFiles()[i];
+				if (file.isDirectory()) {
+
+				} else {
+					if (file.getPath().substring(file.getPath().length() - 4)
+							.equals(".jpg")
+							|| file.getPath()
+									.substring(file.getPath().length() - 5)
+									.equals(".jpeg")) {
+						try {
+							readJPG(file);
+						} catch (ImageReadException e1) {
+							// TODO Auto-generated catch block
+							e1.printStackTrace();
+						} catch (IOException e1) {
+							// TODO Auto-generated catch block
+							e1.printStackTrace();
+						}
+					}
+				}
+			}
+		}
+		MapillaryLayer.getInstance();
+	}
+
+	public void readJPG(File file) throws ImageReadException, IOException {
+		final ImageMetadata metadata = Imaging.getMetadata(file);
+		if (metadata instanceof JpegImageMetadata) {
+			final JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
+			final TiffField lat_ref = jpegMetadata
+					.findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF);
+			final TiffField lat = jpegMetadata
+					.findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LATITUDE);
+			final TiffField lon_ref = jpegMetadata
+					.findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LONGITUDE_REF);
+			final TiffField lon = jpegMetadata
+					.findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LONGITUDE);
+			final TiffField ca = jpegMetadata
+					.findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION);
+			double latValue = 0;
+			double lonValue = 0;
+			double caValue = 0;
+			if (lat.getValue() instanceof RationalNumber[])
+				latValue = DegMinSecToDouble((RationalNumber[]) lat.getValue(),
+						lat_ref.getValue().toString());
+			if (lon.getValue() instanceof RationalNumber[])
+				lonValue = DegMinSecToDouble((RationalNumber[]) lon.getValue(),
+						lon_ref.getValue().toString());
+			if (ca.getValue() instanceof RationalNumber)
+				caValue = ((RationalNumber) ca.getValue()).doubleValue();
+			if (lat_ref.getValue().toString().equals("S"))
+				latValue = -latValue;
+			if (lon_ref.getValue().toString().equals("W"))
+				lonValue = -lonValue;
+			if (latValue != 0 && lonValue != 0) {
+				MapillaryData.getInstance().add(
+						new MapillaryImportedImage(latValue, lonValue, caValue,
+								file));
+			}
+		}
+	}
+
+	private double DegMinSecToDouble(RationalNumber[] degMinSec, String ref) {
+		RationalNumber deg = degMinSec[0];
+		RationalNumber min = degMinSec[1];
+		RationalNumber sec = degMinSec[2];
+		return deg.doubleValue() + min.doubleValue() / 60 + sec.doubleValue()
+				/ 3600;
+	}
+}
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/CommandMoveImage.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/CommandMoveImage.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/CommandMoveImage.java	(revision 31252)
@@ -5,5 +5,5 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
 
 /**
@@ -14,9 +14,9 @@
  */
 public class CommandMoveImage extends MapillaryCommand {
-	private List<MapillaryImage> images;
+	private List<MapillaryAbstractImage> images;
 	private double x;
 	private double y;
 
-	public CommandMoveImage(List<MapillaryImage> images, double x, double y) {
+	public CommandMoveImage(List<MapillaryAbstractImage> images, double x, double y) {
 		this.images = new ArrayList<>(images);
 		this.x = x;
@@ -26,5 +26,5 @@
 	@Override
 	public void undo() {
-		for (MapillaryImage image : images) {
+		for (MapillaryAbstractImage image : images) {
 			image.move(-x, -y);
 			image.stopMoving();
@@ -35,5 +35,5 @@
 	@Override
 	public void redo() {
-		for (MapillaryImage image : images) {
+		for (MapillaryAbstractImage image : images) {
 			image.move(x, y);
 			image.stopMoving();
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/CommandTurnImage.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/CommandTurnImage.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/commands/CommandTurnImage.java	(revision 31252)
@@ -5,5 +5,5 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
 
 /**
@@ -14,8 +14,8 @@
  */
 public class CommandTurnImage extends MapillaryCommand {
-	private List<MapillaryImage> images;
+	private List<MapillaryAbstractImage> images;
 	private double ca;
 
-	public CommandTurnImage(List<MapillaryImage> images, double ca) {
+	public CommandTurnImage(List<MapillaryAbstractImage> images, double ca) {
 		this.images = new ArrayList<>(images);
 		this.ca = ca;
@@ -24,5 +24,5 @@
 	@Override
 	public void undo() {
-		for (MapillaryImage image : images) {
+		for (MapillaryAbstractImage image : images) {
 			image.turn(-ca);
 			image.stopMoving();
@@ -33,5 +33,5 @@
 	@Override
 	public void redo() {
-		for (MapillaryImage image : images) {
+		for (MapillaryAbstractImage image : images) {
 			image.turn(ca);
 			image.stopMoving();
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportDownloadThread.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportDownloadThread.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportDownloadThread.java	(revision 31252)
@@ -13,4 +13,5 @@
 import org.openstreetmap.josm.data.cache.ICachedLoaderListener;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
 import org.openstreetmap.josm.plugins.mapillary.cache.MapillaryCache;
@@ -28,5 +29,5 @@
 	String url;
 	ArrayBlockingQueue<BufferedImage> queue;
-	ArrayBlockingQueue<MapillaryImage> queueImages;
+	ArrayBlockingQueue<MapillaryAbstractImage> queueImages;
 
 	ProgressMonitor monitor;
@@ -35,5 +36,5 @@
 	public MapillaryExportDownloadThread(MapillaryImage image,
 			ArrayBlockingQueue<BufferedImage> queue,
-			ArrayBlockingQueue<MapillaryImage> queueImages) {
+			ArrayBlockingQueue<MapillaryAbstractImage> queueImages) {
 		url = "https://d1cuyjsrcm0gby.cloudfront.net/" + image.getKey()
 				+ "/thumb-2048.jpg";
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportManager.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportManager.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportManager.java	(revision 31252)
@@ -2,4 +2,5 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.awt.image.BufferedImage;
 import java.io.IOException;
@@ -13,4 +14,5 @@
 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
 import org.openstreetmap.josm.io.OsmTransferException;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
 import org.xml.sax.SAXException;
@@ -30,10 +32,10 @@
 
 	ArrayBlockingQueue<BufferedImage> queue;
-	ArrayBlockingQueue<MapillaryImage> queueImages;
+	ArrayBlockingQueue<MapillaryAbstractImage> queueImages;
 
-	List<MapillaryImage> images;
+	List<MapillaryAbstractImage> images;
 	String path;
 
-	public MapillaryExportManager(List<MapillaryImage> images, String path) {
+	public MapillaryExportManager(List<MapillaryAbstractImage> images, String path) {
 		super(tr("Downloading") + "...", new PleaseWaitProgressMonitor(
 				"Exporting Mapillary Images"), true);
@@ -59,18 +61,23 @@
 		ThreadPoolExecutor ex = new ThreadPoolExecutor(20, 35, 25,
 				TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(10));
-		for (MapillaryImage image : images) {
-			try {
-				ex.execute(new MapillaryExportDownloadThread(image, queue,
-						queueImages));
-			} catch (Exception e) {
-				Main.error(e);
+		for (MapillaryAbstractImage image : images) {
+			if (image instanceof MapillaryImage) {
+				try {
+					ex.execute(new MapillaryExportDownloadThread((MapillaryImage) image, queue,
+							queueImages));
+				} catch (Exception e) {
+					Main.error(e);
+				}
+				try {
+					// If the queue is full, waits for it to have more space
+					// available before executing anything else.
+					while (ex.getQueue().remainingCapacity() == 0)
+						Thread.sleep(100);
+				} catch (Exception e) {
+					Main.error(e);
+				}
 			}
-			try {
-				// If the queue is full, waits for it to have more space
-				// available before executing anything else.
-				while (ex.getQueue().remainingCapacity() == 0)
-					Thread.sleep(100);
-			} catch (Exception e) {
-				Main.error(e);
+			else {
+				//TODO
 			}
 		}
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportWriterThread.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportWriterThread.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportWriterThread.java	(revision 31252)
@@ -18,8 +18,8 @@
 import org.apache.commons.imaging.formats.tiff.write.TiffOutputDirectory;
 import org.apache.commons.imaging.formats.tiff.write.TiffOutputSet;
-
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
 
@@ -34,5 +34,5 @@
 	private final String path;
 	private final ArrayBlockingQueue<BufferedImage> queue;
-	private final ArrayBlockingQueue<MapillaryImage> queueImages;
+	private final ArrayBlockingQueue<MapillaryAbstractImage> queueImages;
 	private final int amount;
 	private final ProgressMonitor monitor;
@@ -40,5 +40,5 @@
 	public MapillaryExportWriterThread(String path,
 			ArrayBlockingQueue<BufferedImage> queue,
-			ArrayBlockingQueue<MapillaryImage> queueImages, int amount,
+			ArrayBlockingQueue<MapillaryAbstractImage> queueImages, int amount,
 			ProgressMonitor monitor) {
 		this.path = path;
@@ -54,5 +54,5 @@
 		File tempFile = null;
 		BufferedImage img;
-		MapillaryImage mimg = null;
+		MapillaryAbstractImage mimg = null;
 		String finalPath = "";
 		for (int i = 0; i < amount; i++) {
@@ -60,5 +60,8 @@
 				img = queue.take();
 				mimg = queueImages.take();
-				finalPath = path + "/" + mimg.getKey();
+				if (mimg instanceof MapillaryImage)
+					finalPath = path + "/" + ((MapillaryImage) mimg).getKey();
+				else
+					finalPath = path + "/" + i;
 				// Creates a temporal file that is going to be deleted after
 				// writing the EXIF tags.
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySequenceDownloadThread.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySequenceDownloadThread.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySequenceDownloadThread.java	(revision 31252)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryData;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
@@ -78,6 +79,7 @@
 					break;
 				MapillarySequence sequence = new MapillarySequence(jsonobj.getString("key"), jsonobj.getJsonNumber("captured_at").intValue());
-				for (MapillaryImage mimage : MapillaryData.getInstance().getImages())
-					if (mimage.getSequence().getKey().equals(sequence.getKey()))
+				for (MapillaryAbstractImage mimage : MapillaryData.getInstance().getImages())
+					if (mimage instanceof MapillaryImage
+							&& ((MapillaryImage) mimage).getSequence().getKey().equals(sequence.getKey()))
 						break;
 				int first = -1;
@@ -87,5 +89,5 @@
 				// Here it gets only those images which are in the downloaded
 				// area.
-				for (MapillaryImage img : images) {
+				for (MapillaryAbstractImage img : images) {
 					if (first == -1 && bounds.contains(img.getLatLon()))
 						first = pos;
@@ -106,5 +108,5 @@
 					img.setSequence(sequence);
 				}
-				MapillaryData.getInstance().addWithoutUpdate(finalImages);
+				MapillaryData.getInstance().addWithoutUpdate(new ArrayList<MapillaryAbstractImage>(finalImages));
 				sequence.add(finalImages);
 			}
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySquareDownloadManagerThread.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySquareDownloadManagerThread.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySquareDownloadManagerThread.java	(revision 31252)
@@ -1,3 +1,5 @@
 package org.openstreetmap.josm.plugins.mapillary.downloads;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 import java.util.concurrent.ThreadPoolExecutor;
@@ -34,5 +36,9 @@
 		Main.map.statusLine.setHelpText("Downloading images from Mapillary");
 		downloadSequences();
-		Main.map.statusLine.setHelpText("Total images: " + MapillaryData.getInstance().getImages().size());
+		if (MapillaryData.getInstance().getImages().size() > 0)
+			Main.map.statusLine.setHelpText(tr("Total images: ")
+					+ MapillaryData.getInstance().getImages().size());
+		else
+			Main.map.statusLine.setHelpText(tr("No images found"));
 	}
 
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySquareDownloadThread.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySquareDownloadThread.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySquareDownloadThread.java	(revision 31252)
@@ -13,4 +13,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryData;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
@@ -42,5 +43,5 @@
 			}
 			JsonArray jsonarr = jsonobj.getJsonArray("ims");
-			ArrayList<MapillaryImage> images = new ArrayList<>();
+			ArrayList<MapillaryAbstractImage> images = new ArrayList<>();
 			JsonObject image;
 			for (int i = 0; i < jsonarr.size(); i++) {
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryExportDialog.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryExportDialog.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryExportDialog.java	(revision 31252)
@@ -17,4 +17,5 @@
 
 import org.openstreetmap.josm.plugins.mapillary.MapillaryData;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
 
 /**
@@ -53,5 +54,6 @@
 		// Some options are disabled depending on the circumstances
 		if (MapillaryData.getInstance().getSelectedImage() == null
-				|| MapillaryData.getInstance().getSelectedImage().getSequence() == null) {
+				|| (MapillaryData.getInstance().getSelectedImage() instanceof MapillaryImage && ((MapillaryImage) MapillaryData
+						.getInstance().getSelectedImage()).getSequence() == null)) {
 			sequence.setEnabled(false);
 		}
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryToggleDialog.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryToggleDialog.java	(revision 31251)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryToggleDialog.java	(revision 31252)
@@ -21,4 +21,5 @@
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
 import org.openstreetmap.josm.gui.SideButton;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryData;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
@@ -42,5 +43,5 @@
 	public static MapillaryToggleDialog INSTANCE;
 
-	public volatile MapillaryImage image;
+	public volatile MapillaryAbstractImage image;
 
 	final SideButton nextButton = new SideButton(new nextPictureAction());
@@ -108,25 +109,27 @@
 			if (this.image == null)
 				return;
-			this.nextButton.setEnabled(true);
-			this.previousButton.setEnabled(true);
-			if (this.image.next() == null)
-				this.nextButton.setEnabled(false);
-			if (this.image.previous() == null)
-				this.previousButton.setEnabled(false);
-
-			mapillaryImageDisplay.hyperlink.setURL(image.getKey());
-			this.mapillaryImageDisplay.setImage(null);
-			if (thumbnailCache != null)
-				thumbnailCache.cancelOutstandingTasks();
-			thumbnailCache = new MapillaryCache(image.getKey(),
-					MapillaryCache.Type.THUMBNAIL);
-			thumbnailCache.submit(this, false);
-
-			if (imageCache != null)
-				imageCache.cancelOutstandingTasks();
-			imageCache = new MapillaryCache(image.getKey(),
-					MapillaryCache.Type.FULL_IMAGE);
-			imageCache.submit(this, false);
-
+			if (image instanceof MapillaryImage) {
+				this.nextButton.setEnabled(true);
+				this.previousButton.setEnabled(true);
+				MapillaryImage mapillaryImage = (MapillaryImage) this.image;
+				if (mapillaryImage.next() == null)
+					this.nextButton.setEnabled(false);
+				if (mapillaryImage.previous() == null)
+					this.previousButton.setEnabled(false);
+
+				mapillaryImageDisplay.hyperlink.setURL(mapillaryImage.getKey());
+				this.mapillaryImageDisplay.setImage(null);
+				if (thumbnailCache != null)
+					thumbnailCache.cancelOutstandingTasks();
+				thumbnailCache = new MapillaryCache(mapillaryImage.getKey(),
+						MapillaryCache.Type.THUMBNAIL);
+				thumbnailCache.submit(this, false);
+
+				if (imageCache != null)
+					imageCache.cancelOutstandingTasks();
+				imageCache = new MapillaryCache(mapillaryImage.getKey(),
+						MapillaryCache.Type.FULL_IMAGE);
+				imageCache.submit(this, false);
+			}
 		}
 	}
@@ -137,5 +140,5 @@
 	 * @param image
 	 */
-	public synchronized void setImage(MapillaryImage image) {
+	public synchronized void setImage(MapillaryAbstractImage image) {
 		this.image = image;
 	}
@@ -146,5 +149,5 @@
 	 * @return
 	 */
-	public synchronized MapillaryImage getImage() {
+	public synchronized MapillaryAbstractImage getImage() {
 		return this.image;
 	}
@@ -201,5 +204,6 @@
 		public redAction() {
 			putValue(NAME, tr("Jump to red"));
-			putValue(SHORT_DESCRIPTION,
+			putValue(
+					SHORT_DESCRIPTION,
 					tr("Jumps to the picture at the other side of the red line"));
 		}
@@ -222,5 +226,6 @@
 		public blueAction() {
 			putValue(NAME, tr("Jump to blue"));
-			putValue(SHORT_DESCRIPTION,
+			putValue(
+					SHORT_DESCRIPTION,
 					tr("Jumps to the picture at the other side of the blue line"));
 		}
