Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmFileCacheTileLoader.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmFileCacheTileLoader.java	(revision 24839)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmFileCacheTileLoader.java	(revision 24840)
@@ -113,5 +113,4 @@
 
         public FileLoadJob(TileSource source, int tilex, int tiley, int zoom) {
-            super();
             this.source = source;
             this.tilex = tilex;
@@ -151,5 +150,5 @@
             try {
                 // log.finest("Loading tile from OSM: " + tile);
-                HttpURLConnection urlConn = loadTileFromOsm(tile);
+                URLConnection urlConn = loadTileFromOsm(tile);
                 if (tileFile != null) {
                     switch (source.getTileUpdate()) {
@@ -189,5 +188,6 @@
                     saveETagToFile(eTag);
                 }
-                if (urlConn.getResponseCode() == 304) {
+                loadTileMetadata(tile, urlConn);
+                if (urlConn instanceof HttpURLConnection && ((HttpURLConnection)urlConn).getResponseCode() == 304) {
                     // If we are isModifiedSince or If-None-Match has been set
                     // and the server answers with a HTTP 304 = "Not Modified"
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java	(revision 24839)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java	(revision 24840)
@@ -7,4 +7,5 @@
 import java.net.HttpURLConnection;
 import java.net.URL;
+import java.net.URLConnection;
 
 import org.openstreetmap.gui.jmapviewer.interfaces.TileCache;
@@ -14,5 +15,5 @@
 
 /**
- * A {@link TileLoader} implementation that loads tiles from OSM via HTTP.
+ * A {@link TileLoader} implementation that loads tiles from OSM.
  *
  * @author Jan Peter Stotz
@@ -49,5 +50,7 @@
                 try {
                     // Thread.sleep(500);
-                    input = loadTileFromOsm(tile).getInputStream();
+                    URLConnection conn = loadTileFromOsm(tile);
+                    loadTileMetadata(tile, conn);
+                    input = conn.getInputStream();
                     tile.loadImage(input);
                     tile.setLoaded(true);
@@ -59,6 +62,7 @@
                     tile.error = true;
                     listener.tileLoadingFinished(tile, false);
-                    if (input == null)
+                    if (input == null) {
                         System.err.println("failed loading " + zoom + "/" + tilex + "/" + tiley + " " + e.getMessage());
+                    }
                 } finally {
                     tile.loading = false;
@@ -70,16 +74,26 @@
     }
 
-    protected HttpURLConnection loadTileFromOsm(Tile tile) throws IOException {
+    protected URLConnection loadTileFromOsm(Tile tile) throws IOException {
         URL url;
         url = new URL(tile.getUrl());
-        HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();
-        prepareHttpUrlConnection(urlConn);
+        URLConnection urlConn = url.openConnection();
+        if (urlConn instanceof HttpURLConnection) {
+            prepareHttpUrlConnection((HttpURLConnection)urlConn);
+        }
         urlConn.setReadTimeout(30000); // 30 seconds read timeout
         return urlConn;
     }
 
+    protected void loadTileMetadata(Tile tile, URLConnection urlConn) {
+        String bing_capturedate = urlConn.getHeaderField("X-VE-TILEMETA-CaptureDatesRange");
+        if (bing_capturedate != null) {
+            tile.putValue("capture-date", bing_capturedate);
+        }
+    }
+
     protected void prepareHttpUrlConnection(HttpURLConnection urlConn) {
-        if (USER_AGENT != null)
+        if (USER_AGENT != null) {
             urlConn.setRequestProperty("User-agent", USER_AGENT);
+        }
         urlConn.setRequestProperty("Accept", ACCEPT);
     }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java	(revision 24839)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java	(revision 24840)
@@ -9,4 +9,6 @@
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.imageio.ImageIO;
@@ -48,4 +50,7 @@
     protected boolean loading = false;
     protected boolean error = false;
+
+    /** TileSource-specific tile metadata */
+    protected Map<String, String> metadata;
 
     /**
@@ -253,15 +258,11 @@
 
     public String getStatus() {
-        String status = "new";
-        if (this.error) {
-            status = "error";
-        }
-        if (this.loading) {
-            status = "loading";
-        }
-        if (this.loaded) {
-            status = "loaded";
-        }
-        return status;
+        if (this.error)
+            return "error";
+        if (this.loaded)
+            return "loaded";
+        if (this.loading)
+            return "loading";
+        return "new";
     }
 
@@ -270,3 +271,18 @@
     }
 
+    public void putValue(String key, String value) {
+        if (metadata == null) {
+            metadata = new HashMap<String,String>();
+        }
+        metadata.put(key, value);
+    }
+
+    public String getValue(String key) {
+        if (metadata == null) return null;
+        return metadata.get(key);
+    }
+
+    public Map<String,String> getMetadata() {
+        return metadata;
+    }
 }
