Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 7802)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 7816)
@@ -65,4 +65,5 @@
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.Preferences;
+import org.openstreetmap.josm.data.ProjectionBounds;
 import org.openstreetmap.josm.data.UndoRedoHandler;
 import org.openstreetmap.josm.data.ViewportData;
@@ -72,4 +73,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.PrimitiveDeepCopy;
+import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
 import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.data.projection.ProjectionChangeListener;
@@ -692,10 +694,43 @@
 
     /**
-     * Add a new layer to the map. If no map exists, create one.
-     */
-    public final synchronized void addLayer(final Layer layer) {
+     * Add a new layer to the map.
+     * 
+     * If no map exists, create one.
+     * 
+     * @param layer the layer
+     * 
+     * @see #addLayer(org.openstreetmap.josm.gui.layer.Layer, org.openstreetmap.josm.data.ProjectionBounds)
+     * @see #addLayer(org.openstreetmap.josm.gui.layer.Layer, org.openstreetmap.josm.data.ViewportData)
+     */
+    public final void addLayer(final Layer layer) {
+        BoundingXYVisitor v = new BoundingXYVisitor();
+        layer.visitBoundingBox(v);
+        addLayer(layer, v.getBounds());
+    }
+
+    /**
+     * Add a new layer to the map.
+     * 
+     * If no map exists, create one.
+     * 
+     * @param layer the layer
+     * @param bounds the bounds of the layer (target zoom area)
+     */
+    public final synchronized void addLayer(final Layer layer, ProjectionBounds bounds) {
+        addLayer(layer, new ViewportData(bounds));
+    }
+
+    /**
+     * Add a new layer to the map.
+     * 
+     * If no map exists, create one.
+     * 
+     * @param layer the layer
+     * @param viewport the viewport to zoom to
+     */
+    public final synchronized void addLayer(final Layer layer, ViewportData viewport) {
         boolean noMap = map == null;
         if (noMap) {
-            createMapFrame(layer, null);
+            createMapFrame(layer, viewport);
         }
         layer.hookUpMapView();
