Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/MapUtils.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/MapUtils.java	(revision 15763)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/MapUtils.java	(revision 16290)
@@ -3,9 +3,6 @@
 import java.util.Collection;
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.actions.AutoScaleAction;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
-import org.openstreetmap.josm.gui.MapView;
 
 /**
@@ -21,64 +18,17 @@
 
     /**
-     * Zoom level used for zooming to a single node.
-     */
-    public static final double NODE_ZOOM_LEVEL = 0.00000007;
-
-
-    /**
      * Selects and zooms the JOSM viewport to given primitives.
-     *
-     * <p>It does so by calculating the center of given primitives and
-     * then it zooms to it.</p>
-     *
-     * <p><b>WARNING and TODO:</b> The method {@code zoomTo()} currently
-     * checks for damaged {@link Node}s, whose {@code eastNorth} is set to
-     * null. This property is not accessed in this method and therefore
-     * no checking is done. However the "mad GUI" problem may still arise.
-     * Therefore please be careful.</p>
-     *
-     * @see BoundingXYVisitor
-     * @see MapView
      */
     public static void zoomToMany(Collection<OsmPrimitive> primitives) {
-        BoundingXYVisitor visitor = new BoundingXYVisitor();
-        for (OsmPrimitive op : primitives) {
-            if (op instanceof Node)
-                ((Node) op).visit(visitor);
-
-            else if (op instanceof Way)
-                ((Way) op).visit(visitor);
-        }
-        Main.map.mapView.zoomTo(
-                visitor.min.interpolate(visitor.max, 0.5),
-                NODE_ZOOM_LEVEL);
         Main.ds.setSelected(primitives);
+        (new AutoScaleAction("selection")).actionPerformed(null);
     }
 
     /**
      * Selects and zooms the JOSM viewport to given primitive.
-     *
-     * <p><b>TODO:</b> There is an error in JOSM, which makes the whole
-     * GUI totally mad if we zoom to a {@link Node}, whose {@code eastNorth}
-     * is set null. Currently zooming to such a node is ignored, but the
-     * question is where so such damaged nodes come from?</p>
-     *
-     * @see BoundingXYVisitor
-     * @see MapView
      */
     public static void zoomTo(OsmPrimitive primitive) {
-        BoundingXYVisitor visitor = new BoundingXYVisitor();
-
-        if (primitive instanceof Node && ((Node) primitive).eastNorth != null)
-            Main.map.mapView.zoomTo(((Node) primitive).eastNorth, NODE_ZOOM_LEVEL);
-
-        else if (primitive instanceof Way) {
-            ((Way) primitive).visit(visitor);
-            Main.map.mapView.zoomTo(
-                    visitor.min.interpolate(visitor.max, 0.5),
-                    NODE_ZOOM_LEVEL);
-        }
-
         Main.ds.setSelected(primitive);
+        (new AutoScaleAction("selection")).actionPerformed(null);
     }
 }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java	(revision 15763)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java	(revision 16290)
@@ -97,7 +97,7 @@
 
         if (prim instanceof Node)
-            result += " " + StringUtils.latLonToString(((Node) prim).coor);
+            result += " " + StringUtils.latLonToString(((Node) prim).getCoor());
         else if (prim instanceof Way)
-            result += " " + StringUtils.latLonToString(((Way) prim).firstNode().coor);
+            result += " " + StringUtils.latLonToString(((Way) prim).firstNode().getCoor());
 
         return result;
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java	(revision 15763)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java	(revision 16290)
@@ -40,5 +40,5 @@
         LocationSelector ls = new LocationSelector();
         ls.setVisible(true);
-        
+
         if (ls.getValue() == 1)
             return ls.selectedElement;
@@ -50,5 +50,5 @@
         super(Main.parent, "Výběr umístění",
                             new String[] { "OK", "Zrušit"}, true);
-        
+
         initComponents();
         setupDialog(mainPanel, new String[] { "ok.png", "cancel.png"});
@@ -68,5 +68,5 @@
      * Hardly ever working method for autodetecting the current location.
      *
-     * @deprecated 
+     * @deprecated
      */
     private void autodetectLocation() {
@@ -93,11 +93,5 @@
 
         try {
-            Bounds bounds = visitor.getBounds();
-            LatLon max = bounds.max;
-            LatLon min = bounds.min;
-            center = new LatLon(
-                    (max.getX() + min.getX()) / 2,
-                    (max.getY() + min.getY()) / 2);
-
+            center = Main.proj.eastNorth2latlon(visitor.getBounds().getCenter());
         } catch (Exception e) {
             System.err.println("AUTO: No bounds to determine autolocation.");
@@ -128,5 +122,5 @@
             }
 
-            double currLen = multiplicator * (node.coor.distance(center));
+            double currLen = multiplicator * (node.getCoor().distance(center));
 
 
@@ -138,9 +132,9 @@
 
         if (bestFit != null) {
-            
+
             if (assertions)
                 System.out.println("AUTO: Best fit " + bestFit.getName()
                                  + "\t " + bestFit.get("name"));
-            
+
             for (Region oblast : Database.getInstance().regions) {
                 for (ViToCi obec : oblast.getViToCis()) {
@@ -263,5 +257,5 @@
         ItemEvent event = new ItemEvent(this,
                    ItemEvent.DESELECTED, selectedElement, ItemEvent.DESELECTED);
-        
+
         for (ItemListener i : listeners)
             i.itemStateChanged(event);
@@ -271,5 +265,5 @@
         event = new ItemEvent(this,
                        ItemEvent.SELECTED, selectedElement, ItemEvent.SELECTED);
-        
+
         for (ItemListener i : listeners)
                 i.itemStateChanged(event);
@@ -323,5 +317,5 @@
         else if (oblastComboBox.getSelectedItem() != null)
             selectedElement = ((ElementWithStreets) oblastComboBox.getSelectedItem());
-        
+
         }//GEN-LAST:event_suburbComboBoxItemStateChanged
 
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ExtractAddressIntoNodeProposal.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ExtractAddressIntoNodeProposal.java	(revision 15763)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ExtractAddressIntoNodeProposal.java	(revision 16290)
@@ -51,15 +51,11 @@
         if (!isApplicable(primitive))
             return;
-        
+
         Way way = (Way) primitive;
 
         BoundingXYVisitor visitor = new BoundingXYVisitor();
         way.visit(visitor);
-        LatLon center = new LatLon(
-                (visitor.getBounds().max.lat() + visitor.getBounds().min.lat())/2,
-                (visitor.getBounds().max.lon() + visitor.getBounds().min.lon())/2
-            );
-        
-        Node addrNode = new Node(center);
+
+        Node addrNode = new Node(visitor.getBounds().getCenter());
 
         for (String key : way.keySet())
@@ -75,5 +71,5 @@
     /**
      * Returns textual representation of this proposal.
-     * 
+     *
      * Currently the string is in Czech language (see {@link CzechAddressPlugin}).
      */
@@ -83,5 +79,5 @@
     }
 
-    
+
 
 }
