Index: /applications/editors/josm/plugins/imagery-xml-bounds/build.xml
===================================================================
--- /applications/editors/josm/plugins/imagery-xml-bounds/build.xml	(revision 27014)
+++ /applications/editors/josm/plugins/imagery-xml-bounds/build.xml	(revision 27015)
@@ -32,5 +32,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="4549"/>
+    <property name="plugin.main.version" value="4577"/>
     <!-- should not be necessary to change the following properties -->
     <property name="josm" location="../../core/dist/josm-custom.jar"/>
Index: /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/ImageryXmlBoundsPlugin.java
===================================================================
--- /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/ImageryXmlBoundsPlugin.java	(revision 27014)
+++ /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/ImageryXmlBoundsPlugin.java	(revision 27015)
@@ -21,4 +21,5 @@
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.MapFrame;
+import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
@@ -33,6 +34,7 @@
  * Main class of Imagery XML bounds plugin.
  * @author Don-vip
- * @version 1.2
+ * @version 1.3
  * History:
+ * 1.3 05-Nov-2011 Update for JOSM 4577 (allow to edit selected default imagery entries from Preferences dialog)
  * 1.2 17-Oct-2011 Update for #6960 and JOSM 4523 (allow to download imagery XML bounds with Ctrl-L)
  * 1.1 08-Oct-2011 Update for #6934 and JOSM 4506, code refactorisation, removing debug code
@@ -62,4 +64,9 @@
 	
 	/**
+	 * Class modifying the Imagery preferences panel
+	 */
+	private final XmlBoundsPreferenceSetting preferenceSetting = new XmlBoundsPreferenceSetting();
+	
+	/**
 	 * Initializes the plugin.
 	 * @param info
@@ -79,4 +86,12 @@
 		}
 	}
+	
+    /* (non-Javadoc)
+     * @see org.openstreetmap.josm.plugins.Plugin#getPreferenceSetting()
+     */
+    @Override
+    public PreferenceSetting getPreferenceSetting() {
+        return this.preferenceSetting;
+    }
 
 	/* (non-Javadoc)
Index: /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/XmlBoundsConstants.java
===================================================================
--- /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/XmlBoundsConstants.java	(revision 27014)
+++ /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/XmlBoundsConstants.java	(revision 27015)
@@ -33,5 +33,5 @@
 	 * Plugin version.
 	 */
-	public static final String PLUGIN_VERSION = "1.2";
+	public static final String PLUGIN_VERSION = "1.3";
 	
 	/**
Index: /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/XmlBoundsLayer.java
===================================================================
--- /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/XmlBoundsLayer.java	(revision 27014)
+++ /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/XmlBoundsLayer.java	(revision 27015)
@@ -80,4 +80,8 @@
 	private static final Map<JosmAction, Boolean> actionsStates = new HashMap<JosmAction, Boolean>();
 	
+	public XmlBoundsLayer(DataSet data) {
+		this(data, OsmDataLayer.createNewName(), null);
+	}
+
 	public XmlBoundsLayer(DataSet data, String name, File associatedFile) {
 		super(data, name, associatedFile);
Index: /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/XmlBoundsPreferenceSetting.java
===================================================================
--- /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/XmlBoundsPreferenceSetting.java	(revision 27015)
+++ /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/XmlBoundsPreferenceSetting.java	(revision 27015)
@@ -0,0 +1,50 @@
+//    JOSM Imagery XML Bounds plugin.
+//    Copyright (C) 2011 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.imageryxmlbounds;
+
+import javax.swing.JButton;
+
+import org.openstreetmap.josm.gui.preferences.ImageryPreference;
+import org.openstreetmap.josm.gui.preferences.ImageryPreference.ImageryProvidersPanel;
+import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
+import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
+import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.EditEntriesAction;
+
+/**
+ * 
+ * @author Don-vip
+ *
+ */
+public class XmlBoundsPreferenceSetting implements PreferenceSetting {
+
+	@Override
+	public void addGui(PreferenceTabbedPane gui) {
+		for (PreferenceSetting ps : gui.getSettings()) {
+			if (ps instanceof ImageryPreference) {
+				ImageryProvidersPanel ipp = ((ImageryPreference) ps).getProvidersPanel();
+				EditEntriesAction action = new EditEntriesAction(ipp.defaultTable, ipp.defaultModel);
+				ipp.middleToolbar.add(new JButton(action));
+				// TODO
+				break;
+			}
+		}
+	}
+
+	@Override
+	public boolean ok() {
+		return false;
+	}
+}
Index: /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/EditEntriesAction.java
===================================================================
--- /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/EditEntriesAction.java	(revision 27015)
+++ /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/EditEntriesAction.java	(revision 27015)
@@ -0,0 +1,93 @@
+//    JOSM Imagery XML Bounds plugin.
+//    Copyright (C) 2011 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.imageryxmlbounds.actions;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.JTable;
+import javax.swing.SwingUtilities;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.data.imagery.ImageryInfo;
+import org.openstreetmap.josm.gui.preferences.ImageryPreference.ImageryProvidersPanel.ImageryDefaultLayerTableModel;
+import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsConstants;
+import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsLayer;
+import org.openstreetmap.josm.plugins.imageryxmlbounds.data.XmlBoundsConverter;
+
+@SuppressWarnings("serial")
+public class EditEntriesAction extends JosmAction implements XmlBoundsConstants, ListSelectionListener {
+
+	protected static final String ACTION_NAME = tr("Edit");
+	
+	private final JTable defaultTable;
+	private final ImageryDefaultLayerTableModel defaultModel;
+	
+	private final List<ImageryInfo> entries;
+	
+	public EditEntriesAction(JTable defaultTable, ImageryDefaultLayerTableModel defaultModel) {
+        putValue(SHORT_DESCRIPTION, tr("edit bounds for selected defaults"));
+        putValue(NAME, ACTION_NAME);
+        try {
+        	putValue(SMALL_ICON, XML_ICON_24);
+        } catch (Exception ex) {
+        	ex.printStackTrace();
+        }
+        this.defaultModel = defaultModel;
+        this.defaultTable = defaultTable;
+        this.defaultTable.getSelectionModel().addListSelectionListener(this);
+        this.entries = new ArrayList<ImageryInfo>();
+    	setEnabled(false);
+	}
+	
+	@Override
+	public void actionPerformed(ActionEvent e) {
+		final XmlBoundsLayer layer = new XmlBoundsLayer(
+				XmlBoundsConverter.convertImageryEntries(entries));
+        final Runnable uiStuff = new Runnable() {
+            @Override
+            public void run() {
+                Main.main.addLayer(layer);
+                layer.onPostLoadFromFile();
+            }
+        };
+        if (SwingUtilities.isEventDispatchThread()) {
+            uiStuff.run();
+        } else {
+            SwingUtilities.invokeLater(uiStuff);
+        }
+	}
+
+	@Override
+	public void valueChanged(ListSelectionEvent e) {
+		if (!e.getValueIsAdjusting()) {
+			entries.clear();
+			for (int row : defaultTable.getSelectedRows()) {
+				ImageryInfo info = defaultModel.getRow(row); 
+				if (info != null && info.getBounds() != null) {
+					entries.add(info);
+				}
+			}
+			setEnabled(!entries.isEmpty());
+		}
+	}
+}
Index: /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/data/XmlBoundsConverter.java
===================================================================
--- /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/data/XmlBoundsConverter.java	(revision 27015)
+++ /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/data/XmlBoundsConverter.java	(revision 27015)
@@ -0,0 +1,149 @@
+//    JOSM Imagery XML Bounds plugin.
+//    Copyright (C) 2011 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.imageryxmlbounds.data;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.openstreetmap.gui.jmapviewer.Coordinate;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.imagery.ImageryInfo;
+import org.openstreetmap.josm.data.imagery.Shape;
+import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryBounds;
+import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
+import org.openstreetmap.josm.data.osm.BBox;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.data.osm.RelationMember;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsConstants;
+
+/**
+ * 
+ * @author Don-vip
+ *
+ */
+public class XmlBoundsConverter implements XmlBoundsConstants {
+	
+	public static DataSet convertImageryEntries(List<ImageryInfo> entries) {
+		DataSet dataSet = new DataSet();
+		
+		for (ImageryInfo imagery : entries) {
+			if (!imagery.isBlacklisted()) {
+				ImageryBounds bounds = imagery.getBounds();
+				if (bounds != null) {
+					dataSet.addPrimitive(convertImagery(imagery, bounds, dataSet));
+				}
+			}
+		}
+		return dataSet;
+	}
+	
+	private static void safePut(OsmPrimitive p, String key, Object value) {
+		if (value != null) {
+			if (value instanceof Collection) {
+				String s = "";
+				for (Object elt : (Collection<?>)value) {
+					if (elt != null && elt.toString() != null && !elt.toString().isEmpty()) {
+						if (!s.isEmpty()) {
+							s += ";";
+						}
+						s += elt.toString();
+					}
+				}
+				if (!s.isEmpty()) {
+					p.put(key, s);
+				}
+			} else if (!value.equals(0) && value.toString() != null && !value.toString().isEmpty()) {
+				p.put(key, value.toString());
+			}
+		}
+	}
+	
+    private static Node getNode(LatLon latlon, DataSet dataSet) {
+        List<Node> nodes = dataSet.searchNodes(new BBox(latlon, latlon));
+        if (!nodes.isEmpty()) {
+            return nodes.get(0);
+        } else {
+            Node node = new Node(latlon);
+            dataSet.addPrimitive(node);
+            return node;
+        }
+    }
+
+	private static Node getNode(double lat, double lon, DataSet dataSet) {
+	    return getNode(new LatLon(lat, lon), dataSet);
+	}
+	
+	private static void ensureWayIsClosed(Way way) {
+	    if (!way.getNode(0).equals(way.getNode(way.getNodesCount()-1))) {
+	        way.addNode(way.getNode(0));
+	    }
+	}
+	
+	private static OsmPrimitive convertImagery(ImageryInfo imagery, ImageryBounds bounds, DataSet dataSet) {
+		OsmPrimitive osmImagery = null;
+		if (bounds.getShapes().isEmpty()) {
+			LatLon bottomLeft = bounds.getMin();
+			LatLon topRight = bounds.getMax();
+			LatLon topLeft = new LatLon(topRight.lat(), bottomLeft.lon());
+			LatLon bottomRight = new LatLon(bottomLeft.lat(), topRight.lon());
+			
+			Way way = new Way();
+			for (LatLon ll : new LatLon[]{bottomLeft, topLeft, topRight, bottomRight}) {
+				way.addNode(getNode(ll, dataSet));
+			}
+			ensureWayIsClosed(way);
+			osmImagery = way;
+			
+		} else {
+			Relation relation = new Relation();
+			relation.put("type", "multipolygon");
+			for (Shape shape : bounds.getShapes()) {
+				Way way = new Way();
+				for (Coordinate coor : shape.getPoints()) {
+					way.addNode(getNode(coor.getLat(), coor.getLon(), dataSet));
+				}
+				ensureWayIsClosed(way);
+				dataSet.addPrimitive(way);
+				relation.addMember(new RelationMember("outer", way));
+			}
+			osmImagery = relation;
+		}
+		
+		safePut(osmImagery, KEY_NAME, imagery.getName());
+		safePut(osmImagery, KEY_TYPE, imagery.getImageryType().getUrlString());
+		safePut(osmImagery, KEY_DEFAULT, imagery.isDefaultEntry());
+		safePut(osmImagery, KEY_URL, imagery.getUrl());
+		safePut(osmImagery, KEY_PROJECTIONS, imagery.getServerProjections());
+		safePut(osmImagery, KEY_EULA, imagery.getEulaAcceptanceRequired());
+		safePut(osmImagery, KEY_ATTR_TEXT, imagery.getAttributionText(0, null, null));
+		safePut(osmImagery, KEY_ATTR_URL, imagery.getAttributionLinkURL());
+        safePut(osmImagery, KEY_TERMS_TEXT, imagery.getTermsOfUseText());
+		safePut(osmImagery, KEY_TERMS_URL, imagery.getTermsOfUseURL());
+		safePut(osmImagery, KEY_COUNTRY_CODE, imagery.getCountryCode());
+		safePut(osmImagery, KEY_LOGO_URL, imagery.getAttributionImageURL());
+
+		if (imagery.getImageryType().equals(ImageryType.TMS)) {
+			safePut(osmImagery, KEY_MAX_ZOOM, imagery.getMaxZoom());
+			safePut(osmImagery, KEY_MIN_ZOOM, imagery.getMinZoom());
+		}
+		
+		return osmImagery;
+	}
+}
Index: /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/io/XmlBoundsImporter.java
===================================================================
--- /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/io/XmlBoundsImporter.java	(revision 27014)
+++ /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/io/XmlBoundsImporter.java	(revision 27015)
@@ -20,5 +20,4 @@
 import java.io.File;
 import java.io.IOException;
-import java.util.Collection;
 import java.util.List;
 
@@ -26,18 +25,6 @@
 import javax.swing.SwingUtilities;
 
-import org.openstreetmap.gui.jmapviewer.Coordinate;
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.data.imagery.ImageryInfo;
-import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryBounds;
-import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
-import org.openstreetmap.josm.data.imagery.Shape;
-import org.openstreetmap.josm.data.osm.BBox;
 import org.openstreetmap.josm.data.osm.DataSet;
-import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.data.osm.Relation;
-import org.openstreetmap.josm.data.osm.RelationMember;
-import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.io.FileImporter;
@@ -46,4 +33,5 @@
 import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsConstants;
 import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsLayer;
+import org.openstreetmap.josm.plugins.imageryxmlbounds.data.XmlBoundsConverter;
 import org.xml.sax.SAXException;
 
@@ -56,111 +44,4 @@
 	public XmlBoundsImporter() {
 		super(FILE_FILTER);
-	}
-
-	public DataSet convertImageryEntries(List<ImageryInfo> entries) {
-		DataSet dataSet = new DataSet();
-		
-		for (ImageryInfo imagery : entries) {
-			if (!imagery.isBlacklisted()) {
-				ImageryBounds bounds = imagery.getBounds();
-				if (bounds != null) {
-					dataSet.addPrimitive(convertImagery(imagery, bounds, dataSet));
-				}
-			}
-		}
-		return dataSet;
-	}
-	
-	private void safePut(OsmPrimitive p, String key, Object value) {
-		if (value != null) {
-			if (value instanceof Collection) {
-				String s = "";
-				for (Object elt : (Collection<?>)value) {
-					if (elt != null && elt.toString() != null && !elt.toString().isEmpty()) {
-						if (!s.isEmpty()) {
-							s += ";";
-						}
-						s += elt.toString();
-					}
-				}
-				if (!s.isEmpty()) {
-					p.put(key, s);
-				}
-			} else if (!value.equals(0) && value.toString() != null && !value.toString().isEmpty()) {
-				p.put(key, value.toString());
-			}
-		}
-	}
-	
-    private Node getNode(LatLon latlon, DataSet dataSet) {
-        List<Node> nodes = dataSet.searchNodes(new BBox(latlon, latlon));
-        if (!nodes.isEmpty()) {
-            return nodes.get(0);
-        } else {
-            Node node = new Node(latlon);
-            dataSet.addPrimitive(node);
-            return node;
-        }
-    }
-
-	private Node getNode(double lat, double lon, DataSet dataSet) {
-	    return getNode(new LatLon(lat, lon), dataSet);
-	}
-	
-	private void ensureWayIsClosed(Way way) {
-	    if (!way.getNode(0).equals(way.getNode(way.getNodesCount()-1))) {
-	        way.addNode(way.getNode(0));
-	    }
-	}
-	
-	private OsmPrimitive convertImagery(ImageryInfo imagery, ImageryBounds bounds, DataSet dataSet) {
-		OsmPrimitive osmImagery = null;
-		if (bounds.getShapes().isEmpty()) {
-			LatLon bottomLeft = bounds.getMin();
-			LatLon topRight = bounds.getMax();
-			LatLon topLeft = new LatLon(topRight.lat(), bottomLeft.lon());
-			LatLon bottomRight = new LatLon(bottomLeft.lat(), topRight.lon());
-			
-			Way way = new Way();
-			for (LatLon ll : new LatLon[]{bottomLeft, topLeft, topRight, bottomRight}) {
-				way.addNode(getNode(ll, dataSet));
-			}
-			ensureWayIsClosed(way);
-			osmImagery = way;
-			
-		} else {
-			Relation relation = new Relation();
-			relation.put("type", "multipolygon");
-			for (Shape shape : bounds.getShapes()) {
-				Way way = new Way();
-				for (Coordinate coor : shape.getPoints()) {
-					way.addNode(getNode(coor.getLat(), coor.getLon(), dataSet));
-				}
-				ensureWayIsClosed(way);
-				dataSet.addPrimitive(way);
-				relation.addMember(new RelationMember("outer", way));
-			}
-			osmImagery = relation;
-		}
-		
-		safePut(osmImagery, KEY_NAME, imagery.getName());
-		safePut(osmImagery, KEY_TYPE, imagery.getImageryType().getUrlString());
-		safePut(osmImagery, KEY_DEFAULT, imagery.isDefaultEntry());
-		safePut(osmImagery, KEY_URL, imagery.getUrl());
-		safePut(osmImagery, KEY_PROJECTIONS, imagery.getServerProjections());
-		safePut(osmImagery, KEY_EULA, imagery.getEulaAcceptanceRequired());
-		safePut(osmImagery, KEY_ATTR_TEXT, imagery.getAttributionText(0, null, null));
-		safePut(osmImagery, KEY_ATTR_URL, imagery.getAttributionLinkURL());
-        safePut(osmImagery, KEY_TERMS_TEXT, imagery.getTermsOfUseText());
-		safePut(osmImagery, KEY_TERMS_URL, imagery.getTermsOfUseURL());
-		safePut(osmImagery, KEY_COUNTRY_CODE, imagery.getCountryCode());
-		safePut(osmImagery, KEY_LOGO_URL, imagery.getAttributionImageURL());
-
-		if (imagery.getImageryType().equals(ImageryType.TMS)) {
-			safePut(osmImagery, KEY_MAX_ZOOM, imagery.getMaxZoom());
-			safePut(osmImagery, KEY_MIN_ZOOM, imagery.getMinZoom());
-		}
-		
-		return osmImagery;
 	}
 	
@@ -191,5 +72,5 @@
         }
         
-        return convertImageryEntries(reader.parse());
+        return XmlBoundsConverter.convertImageryEntries(reader.parse());
 	}
 	
