Index: /applications/viewer/jmapviewer/.checkstyle
===================================================================
--- /applications/viewer/jmapviewer/.checkstyle	(revision 31428)
+++ /applications/viewer/jmapviewer/.checkstyle	(revision 31429)
@@ -8,3 +8,6 @@
     <file-match-pattern match-pattern="." include-pattern="true"/>
   </fileset>
+  <filter name="FilesFromPackage" enabled="true">
+    <filter-data value="src/org/openstreetmap/gui/jmapviewer/images"/>
+  </filter>
 </fileset-config>
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/AbstractLayer.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/AbstractLayer.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/AbstractLayer.java	(revision 31429)
@@ -11,25 +11,31 @@
     private Style style;
     private Boolean visible;
-    private Boolean visibleTexts=true;
+    private Boolean visibleTexts = true;
 
-    public AbstractLayer(String name){
-        this(name, (String)null);
+    public AbstractLayer(String name) {
+        this(name, (String) null);
     }
-    public AbstractLayer(String name, String description){
+
+    public AbstractLayer(String name, String description) {
         this(name, description, MapMarkerCircle.getDefaultStyle());
     }
-    public AbstractLayer(String name, Style style){
+
+    public AbstractLayer(String name, Style style) {
         this(name, null, style);
     }
-    public AbstractLayer(String name, String description, Style style){
+
+    public AbstractLayer(String name, String description, Style style) {
         this(null, name, description, style);
     }
-    public AbstractLayer(LayerGroup parent, String name){
+
+    public AbstractLayer(LayerGroup parent, String name) {
         this(parent, name, MapMarkerCircle.getDefaultStyle());
     }
-    public AbstractLayer(LayerGroup parent, String name, Style style){
+
+    public AbstractLayer(LayerGroup parent, String name, Style style) {
         this(parent, name, null, style);
     }
-    public AbstractLayer(LayerGroup parent, String name, String description, Style style){
+
+    public AbstractLayer(LayerGroup parent, String name, String description, Style style) {
         setParent(parent);
         setName(name);
@@ -38,50 +44,64 @@
         setVisible(true);
 
-        if(parent!=null) parent.add(this);
+        if (parent != null) parent.add(this);
     }
+
     public LayerGroup getParent() {
         return parent;
     }
+
     public void setParent(LayerGroup parent) {
         this.parent = parent;
     }
+
     public String getName() {
         return name;
     }
+
     public void setName(String name) {
         this.name = name;
     }
+
     public String getDescription() {
         return description;
     }
+
     public void setDescription(String description) {
         this.description = description;
     }
+
     public Style getStyle() {
         return style;
     }
+
     public void setStyle(Style style) {
         this.style = style;
     }
+
     public Boolean isVisible() {
         return visible;
     }
+
     public void setVisible(Boolean visible) {
         this.visible = visible;
     }
+
     public static <E> List<E> add(List<E> list, E element) {
-        if(element!=null){
-            if(list==null) list = new ArrayList<>();
-            if(!list.contains(element)) list.add(element);
+        if (element != null) {
+            if (list == null) list = new ArrayList<>();
+            if (!list.contains(element)) list.add(element);
         }
         return list;
     }
+
     public Boolean isVisibleTexts() {
         return visibleTexts;
     }
+
     public void setVisibleTexts(Boolean visibleTexts) {
         this.visibleTexts = visibleTexts;
     }
-    public String toString(){
+
+    public String toString() {
         return name;
     }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java	(revision 31429)
@@ -54,5 +54,6 @@
     }
 
-    public void paintAttribution(Graphics g, int width, int height, ICoordinate topLeft, ICoordinate bottomRight, int zoom, ImageObserver observer) {
+    public void paintAttribution(Graphics g, int width, int height, ICoordinate topLeft, ICoordinate bottomRight, 
+            int zoom, ImageObserver observer) {
         if (source == null || !source.requiresAttribution()) {
             attrToUBounds = null;
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java	(revision 31429)
@@ -43,5 +43,6 @@
             return;
         // Is only the selected mouse button pressed?
-        if ((e.getModifiersEx() & MOUSE_BUTTONS_MASK) == movementMouseButtonMask || isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK) {
+        if ((e.getModifiersEx() & MOUSE_BUTTONS_MASK) == movementMouseButtonMask 
+                || isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK) {
             Point p = e.getPoint();
             if (lastDragPoint != null) {
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java	(revision 31429)
@@ -41,8 +41,8 @@
     private JMapViewerTree treeMap = null;
 
-    private JLabel zoomLabel=null;
-    private JLabel zoomValue=null;
-
-    private JLabel mperpLabelName=null;
+    private JLabel zoomLabel = null;
+    private JLabel zoomValue = null;
+
+    private JLabel mperpLabelName = null;
     private JLabel mperpLabelValue = null;
 
@@ -68,9 +68,9 @@
         JPanel helpPanel = new JPanel();
 
-        mperpLabelName=new JLabel("Meters/Pixels: ");
-        mperpLabelValue=new JLabel(String.format("%s",map().getMeterPerPixel()));
-
-        zoomLabel=new JLabel("Zoom: ");
-        zoomValue=new JLabel(String.format("%s", map().getZoom()));
+        mperpLabelName = new JLabel("Meters/Pixels: ");
+        mperpLabelValue = new JLabel(String.format("%s", map().getMeterPerPixel()));
+
+        zoomLabel = new JLabel("Zoom: ");
+        zoomValue = new JLabel(String.format("%s", map().getZoom()));
 
         add(panel, BorderLayout.NORTH);
@@ -101,5 +101,5 @@
         });
         JComboBox<TileLoader> tileLoaderSelector;
-        tileLoaderSelector = new JComboBox<>(new TileLoader[] { new OsmTileLoader(map()) });
+        tileLoaderSelector = new JComboBox<>(new TileLoader[] {new OsmTileLoader(map())});
         tileLoaderSelector.addItemListener(new ItemListener() {
             public void itemStateChanged(ItemEvent e) {
@@ -187,7 +187,7 @@
         treeMap.addLayer(germanyEastLayer);
 
-        MapPolygon bermudas = new MapPolygonImpl(c(49,1), c(45,10), c(40,5));
-        map().addMapPolygon( bermudas );
-        map().addMapPolygon( new MapPolygonImpl(germanyEastLayer, "Riedstadt", ebersheim, darmstadt, eberstadt, empty));
+        MapPolygon bermudas = new MapPolygonImpl(c(49, 1), c(45, 10), c(40, 5));
+        map().addMapPolygon(bermudas);
+        map().addMapPolygon(new MapPolygonImpl(germanyEastLayer, "Riedstadt", ebersheim, darmstadt, eberstadt, empty));
 
         map().addMapMarker(new MapMarkerCircle(germanyWestLayer, "North of Suisse", new Coordinate(48, 7), .5));
@@ -197,5 +197,5 @@
 
         Layer wales = treeMap.addLayer("UK");
-        map().addMapRectangle(new MapRectangleImpl(wales, "Wales", c(53.35,-4.57), c(51.64,-2.63)));
+        map().addMapRectangle(new MapRectangleImpl(wales, "Wales", c(53.35, -4.57), c(51.64, -2.63)));
 
         // map.setDisplayPosition(new Coordinate(49.807, 8.6), 11);
@@ -221,12 +221,14 @@
                     map().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                 }
-                if(showToolTip.isSelected()) map().setToolTipText(map().getPosition(p).toString());
-            }
-        });
-    }
-    private JMapViewer map(){
+                if (showToolTip.isSelected()) map().setToolTipText(map().getPosition(p).toString());
+            }
+        });
+    }
+
+    private JMapViewer map() {
         return treeMap.getViewer();
     }
-    private static Coordinate c(double lat, double lon){
+
+    private static Coordinate c(double lat, double lon) {
         return new Coordinate(lat, lon);
     }
@@ -240,7 +242,7 @@
 
     private void updateZoomParameters() {
-        if (mperpLabelValue!=null)
-            mperpLabelValue.setText(String.format("%s",map().getMeterPerPixel()));
-        if (zoomValue!=null)
+        if (mperpLabelValue != null)
+            mperpLabelValue.setText(String.format("%s", map().getMeterPerPixel()));
+        if (zoomValue != null)
             zoomValue.setText(String.format("%s", map().getZoom()));
     }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/FeatureAdapter.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/FeatureAdapter.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/FeatureAdapter.java	(revision 31429)
@@ -9,16 +9,20 @@
 import java.util.logging.Logger;
 
-public class FeatureAdapter {
+public final class FeatureAdapter {
 
-    public static interface BrowserAdapter {
+    private FeatureAdapter() {
+        // private constructor for utility classes
+    }
+    
+    public interface BrowserAdapter {
         void openLink(String url);
     }
 
-    public static interface TranslationAdapter {
+    public interface TranslationAdapter {
         String tr(String text, Object... objects);
         // TODO: more i18n functions
     }
 
-    public static interface LoggingAdapter {
+    public interface LoggingAdapter {
         Logger getLogger(String name);
     }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 31429)
@@ -49,5 +49,5 @@
      * Vectors for clock-wise tile painting
      */
-    protected static final Point[] move = { new Point(1, 0), new Point(0, 1), new Point(-1, 0), new Point(0, -1) };
+    protected static final Point[] move = {new Point(1, 0), new Point(0, 1), new Point(-1, 0), new Point(0, -1)};
 
     public static final int MAX_ZOOM = 22;
@@ -424,5 +424,5 @@
      * @param lon longitude
      * @param offset Offset respect Latitude
-     * @param checkOutside
+     * @param checkOutside check if the point is outside the displayed area
      * @return Integer the radius in pixels
      */
@@ -444,4 +444,5 @@
      * @param checkOutside check if the point is outside the displayed area
      * @return Integer the radius in pixels
+     * @deprecated use {@link #getLatOffset(double, double, double, boolean)}
      */
     @Deprecated
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewerTree.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewerTree.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewerTree.java	(revision 31429)
@@ -35,8 +35,9 @@
     private JSplitPane splitPane;
 
-    public JMapViewerTree(String name){
+    public JMapViewerTree(String name) {
         this(name, false);
     }
-    public JMapViewerTree(String name, boolean treeVisible){
+
+    public JMapViewerTree(String name, boolean treeVisible) {
         super();
         splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
@@ -64,12 +65,14 @@
                 maybeShowPopup(e);
             }
+
             @Override
             public void mouseReleased(MouseEvent e) {
                 maybeShowPopup(e);
             }
+
             private void maybeShowPopup(MouseEvent e) {
                 if (e.isPopupTrigger()) {
-                    AbstractLayer layer = ((CheckBoxNodePanel)e.getComponent()).getData().getAbstractLayer();
-                    if(layer!=null)
+                    AbstractLayer layer = ((CheckBoxNodePanel) e.getComponent()).getData().getAbstractLayer();
+                    if (layer != null)
                         JMapViewerTree.this.createPopupMenu(layer).show(e.getComponent(), e.getX(), e.getY());
                 }
@@ -77,4 +80,5 @@
         });
     }
+
     private JPopupMenu createPopupMenu(final AbstractLayer layer) {
         JMenuItem menuItemShow = new JMenuItem("show texts");
@@ -85,8 +89,8 @@
 
         // Create items
-        if(layer.isVisibleTexts()==null){
+        if (layer.isVisibleTexts() == null) {
             popup.add(menuItemShow);
             popup.add(menuItemHide);
-        }else if(layer.isVisibleTexts()) popup.add(menuItemHide);
+        } else if (layer.isVisibleTexts()) popup.add(menuItemHide);
         else popup.add(menuItemShow);
 
@@ -95,5 +99,5 @@
             public void actionPerformed(ActionEvent arg0) {
                 setVisibleTexts(layer, true);
-                if(layer.getParent()!=null) layer.getParent().calculateVisibleTexts();
+                if (layer.getParent() != null) layer.getParent().calculateVisibleTexts();
                 map.repaint();
             }
@@ -103,5 +107,5 @@
             public void actionPerformed(ActionEvent arg0) {
                 setVisibleTexts(layer, false);
-                if(layer.getParent()!=null) layer.getParent().calculateVisibleTexts();
+                if (layer.getParent() != null) layer.getParent().calculateVisibleTexts();
                 map.repaint();
             }
@@ -110,51 +114,65 @@
         return popup;
     }
-    private void setVisibleTexts(AbstractLayer layer, boolean visible){
+
+    private void setVisibleTexts(AbstractLayer layer, boolean visible) {
         layer.setVisibleTexts(visible);
-        if(layer instanceof LayerGroup){
-            LayerGroup group = (LayerGroup)layer;
-            if(group.getLayers()!=null) for(AbstractLayer al: group.getLayers()) setVisibleTexts(al, visible);
+        if (layer instanceof LayerGroup) {
+            LayerGroup group = (LayerGroup) layer;
+            if (group.getLayers() != null)
+                for (AbstractLayer al: group.getLayers()) {
+                    setVisibleTexts(al, visible);
+                }
         }
     }
-    public Layer addLayer(String name){
+
+    public Layer addLayer(String name) {
         Layer layer = new Layer(name);
         this.addLayer(layer);
         return layer;
     }
-    public JMapViewerTree addLayer(Layer layer){
+
+    public JMapViewerTree addLayer(Layer layer) {
         tree.addLayer(layer);
         return this;
     }
-    public JMapViewerTree addLayer(MapObject element){
+
+    public JMapViewerTree addLayer(MapObject element) {
         //element.getLayer().add(element);
         return addLayer(element.getLayer());
     }
-    public Layer removeFromLayer(MapObject element){
+
+    public Layer removeFromLayer(MapObject element) {
         element.getLayer().getElements().remove(element);
         return element.getLayer();
     }
-    public static int size(List<?> list){
-        return list==null?0:list.size();
+
+    public static int size(List<?> list) {
+        return list == null ? 0 : list.size();
     }
-    public JMapViewer getViewer(){
+
+    public JMapViewer getViewer() {
         return map;
     }
-    public CheckBoxTree getTree(){
+
+    public CheckBoxTree getTree() {
         return tree;
     }
+
     public void addMapObject(MapObject o){
 
     }
-    public void setTreeVisible(boolean visible){
+
+    public void setTreeVisible(boolean visible) {
         removeAll();
         revalidate();
-        if(visible){
+        if (visible) {
             splitPane.setLeftComponent(treePanel);
             splitPane.setRightComponent(map);
             add(splitPane, BorderLayout.CENTER);
-        }else add(map, BorderLayout.CENTER);
+        } else add(map, BorderLayout.CENTER);
         repaint();
     }
-    private void createRefresh(){
+
+    private void createRefresh() {
         tree.getModel().addTreeModelListener(new TreeModelListener() {
             @Override
@@ -162,12 +180,15 @@
                 repaint();
             }
+
             @Override
             public void treeNodesInserted(TreeModelEvent arg0) {
                 // TODO Auto-generated method stub
             }
+
             @Override
             public void treeNodesRemoved(TreeModelEvent arg0) {
                 // TODO Auto-generated method stub
             }
+
             @Override
             public void treeStructureChanged(TreeModelEvent arg0) {
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JobDispatcher.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JobDispatcher.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JobDispatcher.java	(revision 31429)
@@ -17,5 +17,5 @@
  * @author Jan Peter Stotz
  */
-public class JobDispatcher {
+public final class JobDispatcher {
 
     private static final JobDispatcher instance = new JobDispatcher();
@@ -74,5 +74,5 @@
      * Function to set the maximum number of workers for tile loading.
      */
-    static public void setMaxWorkers(int workers) {
+    public static void setMaxWorkers(int workers) {
         workerThreadMaxCount = workers;
     }
@@ -96,6 +96,6 @@
     public void addJob(TileJob job) {
         try {
-            if(job.getTile() != null) {
-                for(TileJob oldJob : jobQueue) {
+            if (job.getTile() != null) {
+                for (TileJob oldJob : jobQueue) {
                     if (job.getTile().equals(oldJob.getTile())) {
                         return;
@@ -109,4 +109,5 @@
             }
         } catch (InterruptedException e) {
+            System.err.println("InterruptedException: " + e.getMessage());
         }
     }
@@ -146,5 +147,5 @@
                         workerThreadIdleCount++;
                     }
-                    if(modeLIFO) {
+                    if (modeLIFO) {
                         if (firstThread)
                             job = jobQueue.takeLast();
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Layer.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Layer.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Layer.java	(revision 31429)
@@ -9,31 +9,40 @@
     private List<MapObject> elements;
     
-    public Layer(String name){
+    public Layer(String name) {
         super(name);
     }
-    public Layer(String name, String description){
+
+    public Layer(String name, String description) {
         super(name, description);
     }
-    public Layer(String name, Style style){
+
+    public Layer(String name, Style style) {
         super(name, style);
     }
-    public Layer(String name, String description, Style style){
+
+    public Layer(String name, String description, Style style) {
         super(name, description, style);
     }
-    public Layer(LayerGroup parent, String name){
+
+    public Layer(LayerGroup parent, String name) {
         super(parent, name);
     }
-    public Layer(LayerGroup parent, String name, Style style){
+
+    public Layer(LayerGroup parent, String name, Style style) {
         super(parent, name, style);
     }
-    public Layer(LayerGroup parent, String name, String description, Style style){
+
+    public Layer(LayerGroup parent, String name, String description, Style style) {
         super(parent, name, description, style);
     }
+
     public List<MapObject> getElements() {
         return elements;
     }
+
     public void setElements(List<MapObject> elements) {
         this.elements = elements;
     }
+
     public Layer add(MapObject element) {
         element.setLayer(this);
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/LayerGroup.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/LayerGroup.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/LayerGroup.java	(revision 31429)
@@ -7,28 +7,36 @@
     private List<AbstractLayer> layers;
 
-    public LayerGroup(String name){
+    public LayerGroup(String name) {
         super(name);
     }
-    public LayerGroup(String name, String description){
+
+    public LayerGroup(String name, String description) {
         super(name, description);
     }
-    public LayerGroup(String name, Style style){
+
+    public LayerGroup(String name, Style style) {
         super(name, style);
     }
-    public LayerGroup(String name, String description, Style style){
+
+    public LayerGroup(String name, String description, Style style) {
         super(name, description, style);
     }
-    public LayerGroup(LayerGroup parent, String name){
+
+    public LayerGroup(LayerGroup parent, String name) {
         super(parent, name);
     }
-    public LayerGroup(LayerGroup parent, String name, String description, Style style){
+
+    public LayerGroup(LayerGroup parent, String name, String description, Style style) {
         super(name, description, style);
     }
+
     public List<AbstractLayer> getLayers() {
         return layers;
     }
+
     public void setElements(List<AbstractLayer> layers) {
         this.layers = layers;
     }
+
     public Layer addLayer(String name) {
         Layer layer = new Layer(this, name);
@@ -36,4 +44,5 @@
         return layer;
     }
+
     public LayerGroup add(AbstractLayer layer) {
         layer.setParent(this);
@@ -41,15 +50,17 @@
         return this;
     }
+
     public void calculateVisibleTexts() {
-        Boolean calculate=null;
-        if (layers!=null&&layers.size()>0){
-            calculate=layers.get(0).isVisibleTexts();
-            for (int i=1;i<layers.size(); i++){
+        Boolean calculate = null;
+        if (layers != null && layers.size() > 0) {
+            calculate = layers.get(0).isVisibleTexts();
+            for (int i = 1; i < layers.size(); i++) {
                 calculate = resultOf(calculate, layers.get(i).isVisibleTexts());
             }
         }
         setVisibleTexts(calculate);
-        if(getParent()!=null) getParent().calculateVisibleTexts();
+        if (getParent() != null) getParent().calculateVisibleTexts();
     }
+
     public Boolean resultOf(Boolean b1, Boolean b2) {
         if (b1 != null && b1.equals(b2)) {
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapMarkerCircle.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapMarkerCircle.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapMarkerCircle.java	(revision 31429)
@@ -28,19 +28,25 @@
         this(null, null, coord, radius);
     }
+
     public MapMarkerCircle(String name, Coordinate coord, double radius) {
         this(null, name, coord, radius);
     }
+
     public MapMarkerCircle(Layer layer, Coordinate coord, double radius) {
         this(layer, null, coord, radius);
     }
+
     public MapMarkerCircle(double lat, double lon, double radius) {
-        this(null, null, new Coordinate(lat,lon), radius);
+        this(null, null, new Coordinate(lat, lon), radius);
     }
+
     public MapMarkerCircle(Layer layer, double lat, double lon, double radius) {
-        this(layer, null, new Coordinate(lat,lon), radius);
+        this(layer, null, new Coordinate(lat, lon), radius);
     }
+
     public MapMarkerCircle(Layer layer, String name, Coordinate coord, double radius) {
         this(layer, name, coord, radius, STYLE.VARIABLE, getDefaultStyle());
     }
+
     public MapMarkerCircle(Layer layer, String name, Coordinate coord, double radius, STYLE markerStyle, Style style) {
         super(layer, name, style);
@@ -50,7 +56,8 @@
     }
 
-    public Coordinate getCoordinate(){
+    public Coordinate getCoordinate() {
         return coord;
     }
+
     public double getLat() {
         return coord.getLat();
@@ -73,5 +80,5 @@
         int size = size_h * 2;
 
-        if (g instanceof Graphics2D && getBackColor()!=null) {
+        if (g instanceof Graphics2D && getBackColor() != null) {
             Graphics2D g2 = (Graphics2D) g;
             Composite oldComposite = g2.getComposite();
@@ -84,22 +91,25 @@
         g.drawOval(position.x - size_h, position.y - size_h, size, size);
 
-        if(getLayer()==null||getLayer().isVisibleTexts()) paintText(g, position);
+        if (getLayer() == null || getLayer().isVisibleTexts()) paintText(g, position);
     }
 
-    public static Style getDefaultStyle(){
-        return new Style(Color.ORANGE, new Color(200,200,200,200), null, getDefaultFont());
+    public static Style getDefaultStyle() {
+        return new Style(Color.ORANGE, new Color(200, 200, 200, 200), null, getDefaultFont());
     }
+
     @Override
     public String toString() {
         return "MapMarker at " + getLat() + " " + getLon();
     }
+
     @Override
     public void setLat(double lat) {
-        if(coord==null) coord = new Coordinate(lat,0);
+        if (coord == null) coord = new Coordinate(lat, 0);
         else coord.setLat(lat);
     }
+
     @Override
     public void setLon(double lon) {
-        if(coord==null) coord = new Coordinate(0,lon);
+        if (coord == null) coord = new Coordinate(0, lon);
         else coord.setLon(lon);
     }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapMarkerDot.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapMarkerDot.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapMarkerDot.java	(revision 31429)
@@ -21,31 +21,39 @@
         this(null, null, coord);
     }
+
     public MapMarkerDot(String name, Coordinate coord) {
         this(null, name, coord);
     }
+
     public MapMarkerDot(Layer layer, Coordinate coord) {
         this(layer, null, coord);
     }
+
     public MapMarkerDot(Layer layer, String name, Coordinate coord) {
         this(layer, name, coord, getDefaultStyle());
     }
+
     public MapMarkerDot(Color color, double lat, double lon) {
         this(null, null, lat, lon);
         setColor(color);
     }
+
     public MapMarkerDot(double lat, double lon) {
         this(null, null, lat, lon);
     }
+
     public MapMarkerDot(Layer layer, double lat, double lon) {
         this(layer, null, lat, lon);
     }
+
     public MapMarkerDot(Layer layer, String name, double lat, double lon) {
         this(layer, name, new Coordinate(lat, lon), getDefaultStyle());
     }
+
     public MapMarkerDot(Layer layer, String name, Coordinate coord, Style style) {
         super(layer, name, coord, DOT_RADIUS, STYLE.FIXED, style);
     }
 
-    public static Style getDefaultStyle(){
+    public static Style getDefaultStyle() {
         return new Style(Color.BLACK, Color.YELLOW, null, getDefaultFont());
     }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapObjectImpl.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapObjectImpl.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapObjectImpl.java	(revision 31429)
@@ -19,7 +19,9 @@
         this(null, name, null);
     }
+
     public MapObjectImpl(Layer layer) {
         this(layer, null, null);
     }
+
     public MapObjectImpl(Layer layer, String name, Style style) {
         super();
@@ -28,26 +30,33 @@
         this.style = style;
     }
+
     public Layer getLayer() {
         return layer;
     }
+
     public void setLayer(Layer layer) {
         this.layer = layer;
     }
-    public Style getStyle(){
+
+    public Style getStyle() {
         return style;
     }
-    public Style getStyleAssigned(){
+
+    public Style getStyleAssigned() {
         return style == null ? (layer == null ? null : layer.getStyle()) : style;
     }
-    public void setStyle(Style style){
+
+    public void setStyle(Style style) {
         this.style = style;
     }
+
     public Color getColor() {
         Style styleAssigned = getStyleAssigned();
         return styleAssigned == null ? null : getStyleAssigned().getColor();
     }
+
     public void setColor(Color color) {
-        if(style==null&&color!=null) style=new Style();
-        if(style!=null) style.setColor(color);
+        if (style == null && color != null) style = new Style();
+        if (style != null) style.setColor(color);
     }
 
@@ -56,7 +65,8 @@
         return styleAssigned == null ? null : getStyleAssigned().getBackColor();
     }
+
     public void setBackColor(Color backColor) {
-        if(style==null&&backColor!=null) style=new Style();
-        if(style!=null) style.setBackColor(backColor);
+        if (style == null && backColor != null) style = new Style();
+        if (style != null) style.setBackColor(backColor);
     }
 
@@ -65,7 +75,8 @@
         return styleAssigned == null ? null : getStyleAssigned().getStroke();
     }
+
     public void setStroke(Stroke stroke) {
-        if(style==null&&stroke!=null) style=new Style();
-        if(style!=null) style.setStroke(stroke);
+        if (style == null && stroke != null) style = new Style();
+        if (style != null) style.setStroke(stroke);
     }
 
@@ -74,24 +85,31 @@
         return styleAssigned == null ? null : getStyleAssigned().getFont();
     }
+
     public void setFont(Font font) {
-        if(style==null&&font!=null) style=new Style();
-        if(style!=null) style.setFont(font);
+        if (style == null && font != null) style = new Style();
+        if (style != null) style.setFont(font);
     }
-    private boolean isVisibleLayer(){
-        return layer==null||layer.isVisible()==null?true:layer.isVisible();
+
+    private boolean isVisibleLayer() {
+        return layer == null || layer.isVisible() == null ? true : layer.isVisible();
     }
+
     public boolean isVisible() {
-        return visible==null?isVisibleLayer():visible.booleanValue();
+        return visible == null ? isVisibleLayer() : visible.booleanValue();
     }
+
     public void setVisible(Boolean visible) {
         this.visible = visible;
     }
+
     public String getName() {
         return name;
     }
+
     public void setName(String txt) {
         this.name = txt;
     }
-    public static Font getDefaultFont(){
+
+    public static Font getDefaultFont() {
         Font f = UIManager.getDefaults().getFont("TextField.font");
         if (f == null) {
@@ -102,6 +120,6 @@
 
     public void paintText(Graphics g, Point position) {
-        if(name!=null && g!=null && position!=null){
-            if(getFont()==null){
+        if (name != null && g != null && position != null) {
+            if (getFont() == null) {
                 Font f = getDefaultFont();
                 setFont(new Font(f.getName(), Font.BOLD, f.getSize()));
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapPolygonImpl.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapPolygonImpl.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapPolygonImpl.java	(revision 31429)
@@ -25,22 +25,29 @@
         this(null, null, points);
     }
+
     public MapPolygonImpl(List<? extends ICoordinate> points) {
         this(null, null, points);
     }
+
     public MapPolygonImpl(String name, List<? extends ICoordinate> points) {
         this(null, name, points);
     }
+
     public MapPolygonImpl(String name, ICoordinate ... points) {
         this(null, name, points);
     }
+
     public MapPolygonImpl(Layer layer, List<? extends ICoordinate> points) {
         this(layer, null, points);
     }
+
     public MapPolygonImpl(Layer layer, String name, List<? extends ICoordinate> points) {
         this(layer, name, points, getDefaultStyle());
     }
+
     public MapPolygonImpl(Layer layer, String name, ICoordinate ... points) {
         this(layer, name, Arrays.asList(points), getDefaultStyle());
     }
+
     public MapPolygonImpl(Layer layer, String name, List<? extends ICoordinate> points, Style style) {
         super(layer, name, style);
@@ -76,5 +83,5 @@
         // Draw
         g.drawPolygon(polygon);
-        if (g instanceof Graphics2D && getBackColor()!=null) {
+        if (g instanceof Graphics2D && getBackColor() != null) {
             Graphics2D g2 = (Graphics2D) g;
             Composite oldComposite = g2.getComposite();
@@ -91,10 +98,10 @@
         Rectangle rec = polygon.getBounds();
         Point corner = rec.getLocation();
-        Point p= new Point(corner.x+(rec.width/2), corner.y+(rec.height/2));
-        if(getLayer()==null||getLayer().isVisibleTexts()) paintText(g, p);
+        Point p = new Point(corner.x+(rec.width/2), corner.y+(rec.height/2));
+        if (getLayer() == null || getLayer().isVisibleTexts()) paintText(g, p);
     }
 
-    public static Style getDefaultStyle(){
-        return new Style(Color.BLUE, new Color(100,100,100,50), new BasicStroke(2), getDefaultFont());
+    public static Style getDefaultStyle() {
+        return new Style(Color.BLUE, new Color(100, 100, 100, 50), new BasicStroke(2), getDefaultFont());
     }
 
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapRectangleImpl.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapRectangleImpl.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapRectangleImpl.java	(revision 31429)
@@ -19,13 +19,17 @@
         this(null, null, topLeft, bottomRight);
     }
+
     public MapRectangleImpl(String name, Coordinate topLeft, Coordinate bottomRight) {
         this(null, name, topLeft, bottomRight);
     }
+
     public MapRectangleImpl(Layer layer, Coordinate topLeft, Coordinate bottomRight) {
         this(layer, null, topLeft, bottomRight);
     }
+
     public MapRectangleImpl(Layer layer, String name, Coordinate topLeft, Coordinate bottomRight) {
         this(layer, name, topLeft, bottomRight, getDefaultStyle());
     }
+
     public MapRectangleImpl(Layer layer, String name, Coordinate topLeft, Coordinate bottomRight, Style style) {
         super(layer, name, style);
@@ -62,11 +66,11 @@
             ((Graphics2D) g).setStroke(oldStroke);
         }
-        int width=bottomRight.x-topLeft.x;
-        int height=bottomRight.y-topLeft.y;
-        Point p= new Point(topLeft.x+(width/2), topLeft.y+(height/2));
-        if(getLayer()==null||getLayer().isVisibleTexts()) paintText(g, p);
+        int width = bottomRight.x-topLeft.x;
+        int height = bottomRight.y-topLeft.y;
+        Point p = new Point(topLeft.x+(width/2), topLeft.y+(height/2));
+        if (getLayer() == null || getLayer().isVisibleTexts()) paintText(g, p);
     }
 
-    public static Style getDefaultStyle(){
+    public static Style getDefaultStyle() {
         return new Style(Color.BLUE, null, new BasicStroke(2), getDefaultFont());
     }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java	(revision 31429)
@@ -101,5 +101,5 @@
         double aStartLat = Math.toRadians(la1);
         double aStartLong = Math.toRadians(lo1);
-        double aEndLat =Math.toRadians(la2);
+        double aEndLat = Math.toRadians(la2);
         double aEndLong = Math.toRadians(lo2);
 
@@ -130,5 +130,5 @@
     public double LonToX(double aLongitude, int aZoomlevel) {
         int mp = getMaxPixels(aZoomlevel);
-        double x = (mp * (aLongitude + 180l)) / 360l;
+        double x = (mp * (aLongitude + 180L)) / 360L;
         return Math.min(x, mp);
     }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java	(revision 31429)
@@ -22,4 +22,73 @@
 public class OsmTileLoader implements TileLoader {
 
+    private final class OsmTileJob implements TileJob {
+        private final Tile tile;
+        InputStream input = null;
+        boolean force = false;
+
+        private OsmTileJob(Tile tile) {
+            this.tile = tile;
+        }
+
+        public void run() {
+            synchronized (tile) {
+                if ((tile.isLoaded() && !tile.hasError()) || tile.isLoading())
+                    return;
+                tile.loaded = false;
+                tile.error = false;
+                tile.loading = true;
+            }
+            try {
+                URLConnection conn = loadTileFromOsm(tile);
+                if (force) {
+                    conn.setUseCaches(false);
+                }
+                loadTileMetadata(tile, conn);
+                if ("no-tile".equals(tile.getValue("tile-info"))) {
+                    tile.setError("No tile at this zoom level");
+                } else {
+                    input = conn.getInputStream();
+                    try {
+                        tile.loadImage(input);
+                    } finally {
+                        input.close();
+                        input = null;
+                    }
+                }
+                tile.setLoaded(true);
+                listener.tileLoadingFinished(tile, true);
+            } catch (Exception e) {
+                tile.setError(e.getMessage());
+                listener.tileLoadingFinished(tile, false);
+                if (input == null) {
+                    try {
+                        System.err.println("Failed loading " + tile.getUrl() +": "
+                                +e.getClass() + ": " + e.getMessage());
+                    } catch (IOException ioe) {
+                        ioe.printStackTrace();
+                    }
+                }
+            } finally {
+                tile.loading = false;
+                tile.setLoaded(true);
+            }
+        }
+
+        public Tile getTile() {
+            return tile;
+        }
+
+        @Override
+        public void submit() {
+            submit(false);
+        }
+
+        @Override
+        public void submit(boolean force) {
+            this.force = force;
+            run();
+        }
+    }
+
     /**
      * Holds the HTTP headers. Insert e.g. User-Agent here when default should not be used.
@@ -38,70 +107,5 @@
 
     public TileJob createTileLoaderJob(final Tile tile) {
-        return new TileJob() {
-
-            InputStream input = null;
-            boolean force = false;
-
-            public void run() {
-                synchronized (tile) {
-                    if ((tile.isLoaded() && !tile.hasError()) || tile.isLoading())
-                        return;
-                    tile.loaded = false;
-                    tile.error = false;
-                    tile.loading = true;
-                }
-                try {
-                    URLConnection conn = loadTileFromOsm(tile);
-                    if (force) {
-                        conn.setUseCaches(false);
-                    }
-                    loadTileMetadata(tile, conn);
-                    if ("no-tile".equals(tile.getValue("tile-info"))) {
-                        tile.setError("No tile at this zoom level");
-                    } else {
-                        input = conn.getInputStream();
-                        try {
-                            tile.loadImage(input);
-                        } finally {
-                            input.close();
-                            input = null;
-                        }
-                    }
-                    tile.setLoaded(true);
-                    listener.tileLoadingFinished(tile, true);
-                } catch (Exception e) {
-                    tile.setError(e.getMessage());
-                    listener.tileLoadingFinished(tile, false);
-                    if (input == null) {
-                        try {
-                            System.err.println("Failed loading " + tile.getUrl() +": "
-                                    +e.getClass() + ": " + e.getMessage());
-                        } catch (IOException ioe) {
-                            ioe.printStackTrace();
-                        }
-                    }
-                } finally {
-                    tile.loading = false;
-                    tile.setLoaded(true);
-                }
-            }
-
-            public Tile getTile() {
-                return tile;
-            }
-
-            @Override
-            public void submit() {
-                submit(false);
-
-            }
-
-            @Override
-            public void submit(boolean force) {
-                this.force = force;
-                run();
-            }
-
-        };
+        return new OsmTileJob(tile);
     }
 
@@ -111,5 +115,5 @@
         URLConnection urlConn = url.openConnection();
         if (urlConn instanceof HttpURLConnection) {
-            prepareHttpUrlConnection((HttpURLConnection)urlConn);
+            prepareHttpUrlConnection((HttpURLConnection) urlConn);
         }
         return urlConn;
@@ -138,5 +142,10 @@
                     }
                 }
-            } catch (NumberFormatException e) {} //ignore malformed Cache-Control headers
+            } catch (NumberFormatException e) {
+                // ignore malformed Cache-Control headers
+                if (JMapViewer.debug) {
+                    System.err.println(e.getMessage());
+                }
+            }
         }
         if (!lng.equals(0L)) {
@@ -146,10 +155,10 @@
 
     protected void prepareHttpUrlConnection(HttpURLConnection urlConn) {
-        for(Entry<String, String> e : headers.entrySet()) {
+        for (Entry<String, String> e : headers.entrySet()) {
             urlConn.setRequestProperty(e.getKey(), e.getValue());
         }
-        if(timeoutConnect != 0)
+        if (timeoutConnect != 0)
             urlConn.setConnectTimeout(timeoutConnect);
-        if(timeoutRead != 0)
+        if (timeoutRead != 0)
             urlConn.setReadTimeout(timeoutRead);
     }
@@ -159,4 +168,3 @@
         return getClass().getSimpleName();
     }
-
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Style.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Style.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Style.java	(revision 31429)
@@ -16,7 +16,8 @@
     private static final AlphaComposite OPAQUE = AlphaComposite.getInstance(AlphaComposite.SRC);
 
-    public Style(){
+    public Style() {
         super();
     }
+
     public Style(Color color, Color backColor, Stroke stroke, Font font) {
         super();
@@ -30,32 +31,42 @@
         return color;
     }
+
     public void setColor(Color color) {
         this.color = color;
     }
+
     public Color getBackColor() {
         return backColor;
     }
+
     public void setBackColor(Color backColor) {
         this.backColor = backColor;
     }
+
     public Stroke getStroke() {
         return stroke;
     }
+
     public void setStroke(Stroke stroke) {
         this.stroke = stroke;
     }
+
     public Font getFont() {
         return font;
     }
+
     public void setFont(Font font) {
         this.font = font;
     }
-    private AlphaComposite getAlphaComposite(Color color){
-        return color.getAlpha()==255?OPAQUE:TRANSPARENCY;
+
+    private AlphaComposite getAlphaComposite(Color color) {
+        return color.getAlpha() == 255 ? OPAQUE : TRANSPARENCY;
     }
-    public AlphaComposite getAlphaComposite(){
+
+    public AlphaComposite getAlphaComposite() {
         return getAlphaComposite(color);
     }
-    public AlphaComposite getBackAlphaComposite(){
+
+    public AlphaComposite getBackAlphaComposite() {
         return getAlphaComposite(backColor);
     }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java	(revision 31429)
@@ -236,5 +236,4 @@
     }
 
-
     @Override
     public String toString() {
@@ -348,5 +347,5 @@
      * @return metadata of the tile
      */
-    public Map<String,String> getMetadata() {
+    public Map<String, String> getMetadata() {
         if (metadata == null) {
             metadata = new HashMap<>();
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/TileXY.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/TileXY.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/TileXY.java	(revision 31429)
@@ -1,3 +1,3 @@
-// License: GPL. For details, see LICENSE file.
+// License: GPL. For details, see Readme.txt file.
 package org.openstreetmap.gui.jmapviewer;
 
@@ -54,4 +54,3 @@
         return y;
     }
-
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodeData.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodeData.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodeData.java	(revision 31429)
@@ -16,26 +16,34 @@
         this.layer = layer;
     }
+
     public CheckBoxNodeData(final String txt) {
         this(new LayerGroup(txt));
     }
+
     public CheckBoxNodeData(final String txt, final Boolean selected) {
         this(new LayerGroup(txt));
         layer.setVisible(selected);
     }
+
     public Boolean isSelected() {
             return layer.isVisible();
     }
+
     public void setSelected(final Boolean newValue) {
         layer.setVisible(newValue);
     }
+
     public String getText() {
             return layer.getName();
     }
+
     public AbstractLayer getAbstractLayer() {
         return layer;
-}
+    }
+
     public void setAbstractLayer(final AbstractLayer layer) {
             this.layer = layer;
     }
+
     @Override
     public String toString() {
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodeEditor.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodeEditor.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodeEditor.java	(revision 31429)
@@ -53,7 +53,9 @@
         }
     }*/
-    public void addNodeListener(MouseAdapter listener){
+
+    public void addNodeListener(MouseAdapter listener) {
         renderer.addNodeListener(listener);
     }
+
     @Override
     public boolean isCellEditable(final EventObject event) {
@@ -76,6 +78,5 @@
     public Component getTreeCellEditorComponent(final JTree tree,
         final Object value, final boolean selected, final boolean expanded,
-        final boolean leaf, final int row)
-    {
+        final boolean leaf, final int row) {
 
         final Component editor =
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodePanel.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodePanel.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodePanel.java	(revision 31429)
@@ -27,21 +27,25 @@
         add(label, BorderLayout.CENTER);
     }
-    public void setSelected(Boolean bool){
-        if(bool==null){
+
+    public void setSelected(Boolean bool) {
+        if (bool == null) {
             check.getModel().setPressed(true);
             check.getModel().setArmed(true);
-        }else{
+        } else {
             check.setSelected(bool.booleanValue());
             check.getModel().setArmed(false);
         }
     }
+
     public CheckBoxNodeData getData() {
         data.setSelected(check.isSelected());
         return data;
     }
+
     public void setData(CheckBoxNodeData data) {
         this.data = data;
         label.setText(data.getText());
     }
+
     public JLabel getLabel() {
         return label;
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodeRenderer.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodeRenderer.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxNodeRenderer.java	(revision 31429)
@@ -5,10 +5,6 @@
 import java.awt.Component;
 import java.awt.Font;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.awt.event.MouseAdapter;
 
-import javax.swing.JMenuItem;
-import javax.swing.JPopupMenu;
 import javax.swing.JTree;
 import javax.swing.UIManager;
@@ -16,7 +12,4 @@
 import javax.swing.tree.DefaultTreeCellRenderer;
 import javax.swing.tree.TreeCellRenderer;
-
-import org.openstreetmap.gui.jmapviewer.AbstractLayer;
-import org.openstreetmap.gui.jmapviewer.LayerGroup;
 
 /**
@@ -49,5 +42,6 @@
         textBackground = UIManager.getColor("Tree.textBackground");
     }
-    public void addNodeListener(MouseAdapter listener){
+
+    public void addNodeListener(MouseAdapter listener) {
         panel.addMouseListener(listener);
     }
@@ -57,6 +51,5 @@
     public Component getTreeCellRendererComponent(final JTree tree,
         final Object value, final boolean selected, final boolean expanded,
-        final boolean leaf, final int row, final boolean hasFocus)
-    {
+        final boolean leaf, final int row, final boolean hasFocus) {
         CheckBoxNodeData data = null;
         if (value instanceof DefaultMutableTreeNode) {
@@ -81,6 +74,5 @@
             panel.getLabel().setForeground(selectionForeground);
             panel.getLabel().setBackground(selectionBackground);
-        }
-        else {
+        } else {
             panel.setForeground(textForeground);
             panel.setBackground(textBackground);
@@ -101,9 +93,10 @@
         return panel;
     }
+/*
     private JPopupMenu createPopupMenu(final AbstractLayer layer) {
         JMenuItem menuItem;
  
         //Create the popup menu.
-        if(layer.isVisibleTexts()) menuItem = new JMenuItem("hide texts");
+        if (layer.isVisibleTexts()) menuItem = new JMenuItem("hide texts");
         else menuItem = new JMenuItem("show texts");
         JPopupMenu popup = new JPopupMenu();
@@ -118,10 +111,15 @@
         return popup;
     }
-    private void setVisibleTexts(AbstractLayer layer, boolean visible){
+
+    private void setVisibleTexts(AbstractLayer layer, boolean visible) {
         layer.setVisibleTexts(visible);
-        if(layer instanceof LayerGroup){
-            LayerGroup group = (LayerGroup)layer;
-            if(group.getLayers()!=null) for(AbstractLayer al: group.getLayers()) setVisibleTexts(al, visible);
+        if (layer instanceof LayerGroup) {
+            LayerGroup group = (LayerGroup) layer;
+            if (group.getLayers() != null)
+                for (AbstractLayer al : group.getLayers()) {
+                    setVisibleTexts(al, visible);
+                }
         }
     }
+*/
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxTree.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxTree.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxTree.java	(revision 31429)
@@ -30,14 +30,17 @@
     private final CheckBoxNodeEditor editor;
 
-    public CheckBoxTree(AbstractLayer layer){
+    public CheckBoxTree(AbstractLayer layer) {
         this(new CheckBoxNodeData(layer));
     }
-    public CheckBoxTree(String rootName){
+
+    public CheckBoxTree(String rootName) {
         this(new CheckBoxNodeData(rootName));
     }
-    public CheckBoxTree(CheckBoxNodeData root ){
+
+    public CheckBoxTree(CheckBoxNodeData root) {
         this(new DefaultMutableTreeNode(root));
     }
-    public CheckBoxTree(DefaultMutableTreeNode node){
+
+    public CheckBoxTree(DefaultMutableTreeNode node) {
         super(new DefaultTreeModel(node));
 
@@ -53,10 +56,10 @@
             @Override
             public void treeNodesChanged(final TreeModelEvent e) {
-                DefaultTreeModel model = (DefaultTreeModel)e.getSource();
+                DefaultTreeModel model = (DefaultTreeModel) e.getSource();
                 Object[] nodes = e.getChildren();
                 DefaultMutableTreeNode node;
-                if(nodes==null||nodes.length==0){
+                if (nodes == null || nodes.length == 0) {
                     node = node(model.getRoot());
-                }else{
+                } else {
                     node = node(nodes[0]);
                 }
@@ -81,9 +84,11 @@
         });
     }
-    public void addNodeListener(MouseAdapter listener){
+
+    public void addNodeListener(MouseAdapter listener) {
         editor.addNodeListener(listener);
     }
-    public static void main(final String args[]) {
-        final DefaultMutableTreeNode root = new DefaultMutableTreeNode(new CheckBoxNodeData("Root",true));
+
+    public static void main(final String[] args) {
+        final DefaultMutableTreeNode root = new DefaultMutableTreeNode(new CheckBoxNodeData("Root", true));
 
         final DefaultMutableTreeNode accessibility =
@@ -102,6 +107,6 @@
 
         final CheckBoxTree tree = new CheckBoxTree(root);
-        ((DefaultMutableTreeNode)tree.getModel().getRoot()).add(new DefaultMutableTreeNode(new CheckBoxNodeData("gggg", null)));
-        ((DefaultTreeModel)tree.getModel()).reload();
+        ((DefaultMutableTreeNode) tree.getModel().getRoot()).add(new DefaultMutableTreeNode(new CheckBoxNodeData("gggg", null)));
+        ((DefaultTreeModel) tree.getModel()).reload();
         // listen for changes in the selection
         tree.addTreeSelectionListener(new TreeSelectionListener() {
@@ -119,7 +124,8 @@
         frame.setVisible(true);
     }
-    private static Boolean childStatus(DefaultMutableTreeNode node){
+
+    private static Boolean childStatus(DefaultMutableTreeNode node) {
         Boolean status = data(node.getChildAt(0)).isSelected();
-        for (int i=1; i<node.getChildCount() && status!=null; i++){
+        for (int i = 1; i < node.getChildCount() && status != null; i++) {
             if (!status.equals(
                     data(node.getChildAt(i)).isSelected()
@@ -129,11 +135,12 @@
         return status;
     }
-    private static void changeParents(DefaultMutableTreeNode node){
-        if(node!=null){
+
+    private static void changeParents(DefaultMutableTreeNode node) {
+        if (node != null) {
             DefaultMutableTreeNode parent = node(node.getParent());
-            if(parent!=null){
+            if (parent != null) {
                 CheckBoxNodeData dataParent = data(parent);
                 Boolean childStatus = childStatus(parent);
-                if(childStatus != null && !childStatus.equals(dataParent.isSelected())) {
+                if (childStatus != null && !childStatus.equals(dataParent.isSelected())) {
                     dataParent.setSelected(childStatus);
                     changeParents(parent);
@@ -142,14 +149,16 @@
         }
     }
-    private static void nodeChanged(DefaultMutableTreeNode node){
-        if(node!=null){
+
+    private static void nodeChanged(DefaultMutableTreeNode node) {
+        if (node != null) {
             changeParents(node);
             setChildrens(node, data(node).isSelected());
         }
     }
-    private static void setChildrens(DefaultMutableTreeNode node, Boolean value){
-        for(int i=0; i<node.getChildCount(); i++){
+
+    private static void setChildrens(DefaultMutableTreeNode node, Boolean value) {
+        for (int i = 0; i < node.getChildCount(); i++) {
             DefaultMutableTreeNode childNode = node(node.getChildAt(i));
-            if (!data(childNode).isSelected().equals(data(node).isSelected())){
+            if (!data(childNode).isSelected().equals(data(node).isSelected())) {
                 data(childNode).setSelected(data(node).isSelected());
                 setChildrens(childNode, value);
@@ -157,23 +166,30 @@
         }
     }
-    public DefaultMutableTreeNode rootNode(){
+
+    public DefaultMutableTreeNode rootNode() {
         return node(getModel().getRoot());
     }
-    public LayerGroup rootLayer(){
-        return (LayerGroup)rootData().getAbstractLayer();
-    }
-    public CheckBoxNodeData rootData(){
+
+    public LayerGroup rootLayer() {
+        return (LayerGroup) rootData().getAbstractLayer();
+    }
+
+    public CheckBoxNodeData rootData() {
         return data(rootNode());
     }
-    private static DefaultMutableTreeNode node(Object node){
-        return (DefaultMutableTreeNode)node;
-    }
-    public static CheckBoxNodeData data(DefaultMutableTreeNode node){
-        return node==null?null:(CheckBoxNodeData)node.getUserObject();
-    }
-    private static CheckBoxNodeData data(Object node){
+
+    private static DefaultMutableTreeNode node(Object node) {
+        return (DefaultMutableTreeNode) node;
+    }
+
+    public static CheckBoxNodeData data(DefaultMutableTreeNode node) {
+        return node == null ? null : (CheckBoxNodeData) node.getUserObject();
+    }
+
+    private static CheckBoxNodeData data(Object node) {
         return data(node(node));
     }
-    private static DefaultMutableTreeNode add(final DefaultMutableTreeNode parent, final String text, final boolean checked){
+
+    private static DefaultMutableTreeNode add(final DefaultMutableTreeNode parent, final String text, final boolean checked) {
         final CheckBoxNodeData data = new CheckBoxNodeData(text, checked);
         final DefaultMutableTreeNode node = new DefaultMutableTreeNode(data);
@@ -181,15 +197,18 @@
         return node;
     }
-    public static CheckBoxNodeData createNodeData(AbstractLayer layer){
+
+    public static CheckBoxNodeData createNodeData(AbstractLayer layer) {
         return new CheckBoxNodeData(layer);
     }
-    public static DefaultMutableTreeNode createNode(AbstractLayer layer){
+
+    public static DefaultMutableTreeNode createNode(AbstractLayer layer) {
         return new DefaultMutableTreeNode(createNodeData(layer));
     }
-    /*public DefaultMutableTreeNode addLayerGroup(LayerGroup group){
-        if(group!=null){
-            if(group.getParent()==null){
+
+    /*public DefaultMutableTreeNode addLayerGroup(LayerGroup group) {
+        if (group != null){
+            if (group.getParent() == null){
                 return add(rootNode(), group);
-            }else{
+            } else {
                 DefaultMutableTreeNode parentGroup = searchNode(group.getParent());
                 if(parentGroup==null) parentGroup = addLayerGroup(group.getParent());
@@ -199,40 +218,46 @@
         }else return null;
     }*/
-    public Layer addLayer(String name){
+
+    public Layer addLayer(String name) {
         Layer layer = new Layer(name);
         addLayer(layer);
         return layer;
     }
-    public DefaultMutableTreeNode addLayer(AbstractLayer layer){
-        if (layer!=null){
+
+    public DefaultMutableTreeNode addLayer(AbstractLayer layer) {
+        if (layer != null) {
             DefaultMutableTreeNode parent;
-            if(layer.getParent()==null){
+            if (layer.getParent() == null) {
                 rootLayer().add(layer);
                 parent = rootNode();
-            }else{
+            } else {
                 parent = searchNode(layer.getParent());
-                if(parent==null) parent=addLayer(layer.getParent());
+                if (parent == null)
+                    parent = addLayer(layer.getParent());
             }
             return add(parent, layer);
-        }else return null;
-    }
-    public DefaultMutableTreeNode add(DefaultMutableTreeNode parent, final AbstractLayer layer){
+        } else return null;
+    }
+
+    public DefaultMutableTreeNode add(DefaultMutableTreeNode parent, final AbstractLayer layer) {
         layer.setVisible(data(parent).isSelected());
         DefaultMutableTreeNode node = createNode(layer);
         parent.add(node);
-        ((DefaultTreeModel)getModel()).reload();
+        ((DefaultTreeModel) getModel()).reload();
         //System.out.println("Created node "+layer+" upper of "+data(parent));
         return node;
     }
-    public DefaultMutableTreeNode searchNode(AbstractLayer layer){
+
+    public DefaultMutableTreeNode searchNode(AbstractLayer layer) {
         return searchNode(rootNode(), layer);
     }
-    public DefaultMutableTreeNode searchNode(DefaultMutableTreeNode node, AbstractLayer layer){
+
+    public DefaultMutableTreeNode searchNode(DefaultMutableTreeNode node, AbstractLayer layer) {
         CheckBoxNodeData data = CheckBoxTree.data(node);
-        if(data.getAbstractLayer() == layer) return node;
-        else{
+        if (data.getAbstractLayer() == layer) return node;
+        else {
             DefaultMutableTreeNode found = null;
-            for(int i=0; i<node.getChildCount() && found==null; i++){
-                found = searchNode((DefaultMutableTreeNode)node.getChildAt(i), layer);
+            for (int i = 0; i < node.getChildCount() && found == null; i++) {
+                found = searchNode((DefaultMutableTreeNode) node.getChildAt(i), layer);
             }
             return found;
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/CachedTileLoader.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/CachedTileLoader.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/CachedTileLoader.java	(revision 31429)
@@ -6,4 +6,4 @@
  */
 public interface CachedTileLoader {
-    public void clearCache(TileSource source);
+    void clearCache(TileSource source);
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/ICoordinate.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/ICoordinate.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/ICoordinate.java	(revision 31429)
@@ -3,7 +3,11 @@
 
 public interface ICoordinate {
-    public double getLat();
-    public void setLat(double lat);
-    public double getLon();
-    public void setLon(double lon);
+
+    double getLat();
+
+    void setLat(double lat);
+
+    double getLon();
+
+    void setLon(double lon);
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/JMapViewerEventListener.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/JMapViewerEventListener.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/JMapViewerEventListener.java	(revision 31429)
@@ -14,4 +14,4 @@
  */
 public interface JMapViewerEventListener extends EventListener {
-    public void processCommand(JMVCommandEvent command);
+    void processCommand(JMVCommandEvent command);
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapMarker.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapMarker.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapMarker.java	(revision 31429)
@@ -22,24 +22,25 @@
      * @return Latitude and Longitude of the map marker position
      */
-    public Coordinate getCoordinate();
+    Coordinate getCoordinate();
+
     /**
      * @return Latitude of the map marker position
      */
-    public double getLat();
+    double getLat();
 
     /**
      * @return Longitude of the map marker position
      */
-    public double getLon();
+    double getLon();
 
     /**
      * @return Radius of the map marker position
      */
-    public double getRadius();
+    double getRadius();
 
     /**
      * @return Style of the map marker
      */
-    public STYLE getMarkerStyle();
+    STYLE getMarkerStyle();
 
     /**
@@ -51,4 +52,4 @@
      * @param radius radius
      */
-    public void paint(Graphics g, Point position, int radius);
+    void paint(Graphics g, Point position, int radius);
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapObject.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapObject.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapObject.java	(revision 31429)
@@ -11,13 +11,22 @@
 public interface MapObject {
 
-    public Layer getLayer();
-    public void setLayer(Layer layer);
-    public Style getStyle();
-    public Style getStyleAssigned();
-    public Color getColor();
-    public Color getBackColor();
-    public Stroke getStroke();
-    public Font getFont();
-    public String getName();
-    public boolean isVisible();
+    Layer getLayer();
+
+    void setLayer(Layer layer);
+
+    Style getStyle();
+
+    Style getStyleAssigned();
+
+    Color getColor();
+
+    Color getBackColor();
+
+    Stroke getStroke();
+
+    Font getFont();
+
+    String getName();
+
+    boolean isVisible();
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapPolygon.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapPolygon.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapPolygon.java	(revision 31429)
@@ -17,5 +17,5 @@
      * @return Latitude/Longitude of each point of polygon
      */
-    public List<? extends ICoordinate> getPoints();
+    List<? extends ICoordinate> getPoints();
 
     /**
@@ -26,5 +26,5 @@
      * @param points list of points defining the polygon to draw
      */
-    public void paint(Graphics g, List<Point> points);
+    void paint(Graphics g, List<Point> points);
 
     /**
@@ -35,4 +35,4 @@
      * @param polygon polygon to draw
      */
-    public void paint(Graphics g, Polygon polygon);
+    void paint(Graphics g, Polygon polygon);
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapRectangle.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapRectangle.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapRectangle.java	(revision 31429)
@@ -20,10 +20,10 @@
      * @return Latitude/Longitude of top left of rectangle
      */
-    public Coordinate getTopLeft();
+    Coordinate getTopLeft();
 
     /**
      * @return Latitude/Longitude of bottom right of rectangle
      */
-    public Coordinate getBottomRight();
+    Coordinate getBottomRight();
 
     /**
@@ -35,4 +35,4 @@
      * @param bottomRight bottom right edge of painting region
      */
-    public void paint(Graphics g, Point topLeft, Point bottomRight);
+    void paint(Graphics g, Point topLeft, Point bottomRight);
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TemplatedTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TemplatedTileSource.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TemplatedTileSource.java	(revision 31429)
@@ -1,3 +1,3 @@
-// License: GPL. For details, see LICENSE file.
+// License: GPL. For details, see Readme.txt file.
 package org.openstreetmap.gui.jmapviewer.interfaces;
 
@@ -15,4 +15,4 @@
      * @return headers to be sent with http requests
      */
-    public Map<String, String> getHeaders();
+    Map<String, String> getHeaders();
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java	(revision 31429)
@@ -28,5 +28,5 @@
      *         present in the cache
      */
-    public Tile getTile(TileSource source, int x, int y, int z);
+    Tile getTile(TileSource source, int x, int y, int z);
 
     /**
@@ -37,14 +37,14 @@
      * @param tile the tile to be added
      */
-    public void addTile(Tile tile);
+    void addTile(Tile tile);
 
     /**
      * @return the number of tiles hold by the cache
      */
-    public int getTileCount();
+    int getTileCount();
 
     /**
      * Clears the cache deleting all tiles from memory.
      */
-    public void clear();
+    void clear();
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileClearController.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileClearController.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileClearController.java	(revision 31429)
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileJob.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileJob.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileJob.java	(revision 31429)
@@ -17,5 +17,5 @@
      * @return {@link Tile} to be handled
      */
-    public Tile getTile();
+    Tile getTile();
 
     /**
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoader.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoader.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoader.java	(revision 31429)
@@ -20,4 +20,4 @@
      *          action.
      */
-    public TileJob createTileLoaderJob(Tile tile);
+    TileJob createTileLoaderJob(Tile tile);
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoaderListener.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoaderListener.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoaderListener.java	(revision 31429)
@@ -13,4 +13,4 @@
      * @param success {@code true} if the tile has been loaded successfully, {@code false} otherwise
      */
-    public void tileLoadingFinished(Tile tile, boolean success);
+    void tileLoadingFinished(Tile tile, boolean success);
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java	(revision 31429)
@@ -38,6 +38,7 @@
      * </ul>
      *
-     */
-    @Deprecated //not used anymore
+     * @deprecated not used anymore
+     */
+    @Deprecated
     public enum TileUpdate {
         IfNoneMatch, ETag, IfModifiedSince, LastModified, None
@@ -100,7 +101,7 @@
      * get the same identifier. Used for creation of cache key.
      *
-     * @param zoom
-     * @param tilex
-     * @param tiley
+     * @param zoom zoom level
+     * @param tilex X coordinate
+     * @param tiley Y coordinate
      * @return tile identifier
      */
@@ -117,5 +118,5 @@
      * TODO: @since
      */
-    public int getDefaultTileSize();
+    int getDefaultTileSize();
 
     /**
@@ -131,7 +132,8 @@
     /**
      * Transform longitude to pixelspace.
-     * @param aLongitude
-     * @param aZoomlevel
+     * @param aLongitude longitude
+     * @param aZoomlevel zoom level
      * @return [0..2^Zoomlevel*TILE_SIZE[
+     * @deprecated use {@link #latLonToXY(double, double, int)} instead
      */
     @Deprecated
@@ -140,8 +142,8 @@
     /**
      * Transforms latitude to pixelspace.
-     * @param aLat
-     * @param aZoomlevel
+     * @param aLat latitude
+     * @param aZoomlevel zoom level
      * @return [0..2^Zoomlevel*TILE_SIZE[
-     * @deprecated use lonLatToXY instead
+     * @deprecated use {@link #latLonToXY(double, double, int)} instead
      */
     @Deprecated
@@ -149,23 +151,24 @@
 
     /**
-     * @param lon
-     * @param lat
-     * @param zoom
+     * @param lon longitude
+     * @param lat latitude
+     * @param zoom zoom level
      * @return transforms longitude and latitude to pixel space (as if all tiles at specified zoom level where joined)
      */
-    public Point latLonToXY(double lat, double lon, int zoom);
-
-    /**
-     * @param point
-     * @param zoom
+    Point latLonToXY(double lat, double lon, int zoom);
+
+    /**
+     * @param point point
+     * @param zoom zoom level
      * @return transforms longitude and latitude to pixel space (as if all tiles at specified zoom level where joined)
      */
-    public Point latLonToXY(ICoordinate point, int zoom);
+    Point latLonToXY(ICoordinate point, int zoom);
 
     /**
      * Transforms pixel coordinate X to longitude
-     * @param aX
-     * @param aZoomlevel
+     * @param aX X coordinate
+     * @param aZoomlevel zoom level
      * @return ]-180..180[
+     * @deprecated use {@link #XYToLatLon(int, int, int)} instead
      */
     @Deprecated
@@ -174,7 +177,8 @@
     /**
      * Transforms pixel coordinate Y to latitude.
-     * @param aY
-     * @param aZoomlevel
+     * @param aY Y coordinate
+     * @param aZoomlevel zoom level
      * @return [MIN_LAT..MAX_LAT]
+     * @deprecated use {@link #XYToLatLon(int, int, int)} instead
      */
     @Deprecated
@@ -182,24 +186,25 @@
 
     /**
-     * @param point
-     * @param zoom
+     * @param point point
+     * @param zoom zoom level
      * @return WGS84 Coordinates of given point
      */
-    public ICoordinate XYToLatLon(Point point, int zoom);
-
-    /**
-     *
-     * @param x
-     * @param y
-     * @param zoom
+    ICoordinate XYToLatLon(Point point, int zoom);
+
+    /**
+     *
+     * @param x X coordinate
+     * @param y Y coordinate
+     * @param zoom zoom level
      * @return WGS84 Coordinates of given point
      */
-    public ICoordinate XYToLatLon(int x, int y, int zoom);
+    ICoordinate XYToLatLon(int x, int y, int zoom);
 
     /**
      * Transforms longitude to X tile coordinate.
-     * @param lon
-     * @param zoom
+     * @param lon longitude
+     * @param zoom zoom level
      * @return [0..2^Zoomlevel[
+     * @deprecated use {@link #latLonToTileXY(int, int, int)} instead
      */
     @Deprecated
@@ -208,7 +213,8 @@
     /**
      * Transforms latitude to Y tile coordinate.
-     * @param lat
-     * @param zoom
+     * @param lat latitude
+     * @param zoom zoom level
      * @return [0..2^Zoomlevel[
+     * @deprecated use {@link #latLonToTileXY(int, int, int)} instead
      */
     @Deprecated
@@ -216,24 +222,25 @@
 
     /**
-     * @param lon
-     * @param lat
-     * @param zoom
+     * @param lon longitude
+     * @param lat latitude
+     * @param zoom zoom level
      * @return x and y tile indices
      */
-    public TileXY latLonToTileXY(double lat, double lon, int zoom);
-
-    /**
-     *
-     * @param point
-     * @param zoom
+    TileXY latLonToTileXY(double lat, double lon, int zoom);
+
+    /**
+     *
+     * @param point point
+     * @param zoom zoom level
      * @return x and y tile indices
      */
-    public TileXY latLonToTileXY(ICoordinate point, int zoom);
+    TileXY latLonToTileXY(ICoordinate point, int zoom);
 
     /**
      * Transforms tile X coordinate to longitude.
-     * @param x
-     * @param zoom
+     * @param x X coordinate
+     * @param zoom zoom level
      * @return ]-180..180[
+     * @deprecated use {@link #tileXYToLatLon(int, int, int)} instead
      */
     @Deprecated
@@ -242,7 +249,8 @@
     /**
      * Transforms tile Y coordinate to latitude.
-     * @param y
-     * @param zoom
+     * @param y Y coordinate
+     * @param zoom zoom level
      * @return [MIN_LAT..MAX_LAT]
+     * @deprecated use {@link #tileXYToLatLon(int, int, int)} instead
      */
     @Deprecated
@@ -250,51 +258,51 @@
 
     /**
-     * @param xy
-     * @param zoom
+     * @param xy X/Y coordinates
+     * @param zoom zoom level
      * @return WGS84 coordinates of given tile
      */
-    public ICoordinate tileXYToLatLon(TileXY xy, int zoom);
-
-    /**
-     *
-     * @param tile
+    ICoordinate tileXYToLatLon(TileXY xy, int zoom);
+
+    /**
+     *
+     * @param tile Tile
      * @return WGS84 coordinates of given tile
      */
-    public ICoordinate tileXYToLatLon(Tile tile);
-
-    /**
-     *
-     * @param x
-     * @param y
-     * @param zoom
+    ICoordinate tileXYToLatLon(Tile tile);
+
+    /**
+     *
+     * @param x X coordinate
+     * @param y Y coordinate
+     * @param zoom zoom level
      * @return WGS84 coordinates of given tile
      */
-    public ICoordinate tileXYToLatLon(int x, int y, int zoom);
-
-    /**
-     * @param zoom
+    ICoordinate tileXYToLatLon(int x, int y, int zoom);
+
+    /**
+     * @param zoom zoom level
      * @return maximum X index of tile for specified zoom level
      */
-    public int getTileXMax(int zoom);
-
-    /**
-     *
-     * @param zoom
+    int getTileXMax(int zoom);
+
+    /**
+     *
+     * @param zoom zoom level
      * @return minimum X index of tile for specified zoom level
      */
-    public int getTileXMin(int zoom);
-
-    /**
-     *
-     * @param zoom
+    int getTileXMin(int zoom);
+
+    /**
+     *
+     * @param zoom zoom level
      * @return maximum Y index of tile for specified zoom level
      */
-    public int getTileYMax(int zoom);
-
-    /**
-     * @param zoom
+    int getTileYMax(int zoom);
+
+    /**
+     * @param zoom zoom level
      * @return minimum Y index of tile for specified zoom level
      */
-    public int getTileYMin(int zoom);
+    int getTileYMin(int zoom);
 
     /**
@@ -307,5 +315,5 @@
      * @return true, if "no tile at this zoom level" situation detected
      */
-    public boolean isNoTileAtZoom(Map<String, List<String>> headers, int statusCode, byte[] content);
+    boolean isNoTileAtZoom(Map<String, List<String>> headers, int statusCode, byte[] content);
 
     /**
@@ -315,6 +323,4 @@
      * @return tile metadata
      */
-    public Map<String, String> getMetadata(Map<String, List<String>> headers);
-
-
+    Map<String, String> getMetadata(Map<String, List<String>> headers);
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/package.html
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/package.html	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/package.html	(revision 31429)
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java	(revision 31429)
@@ -12,5 +12,6 @@
     
     /**
-     * The OSM attribution. Must be always in line with <a href="https://www.openstreetmap.org/copyright/en">https://www.openstreetmap.org/copyright/en</a>
+     * The OSM attribution. Must be always in line with 
+     * <a href="https://www.openstreetmap.org/copyright/en">https://www.openstreetmap.org/copyright/en</a>
      */
     public static final String DEFAULT_OSM_ATTRIBUTION = "\u00a9 OpenStreetMap contributors";
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java	(revision 31429)
@@ -39,6 +39,6 @@
         this.name = info.getName();
         this.baseUrl = info.getUrl();
-        if(baseUrl != null && baseUrl.endsWith("/")) {
-            baseUrl = baseUrl.substring(0,baseUrl.length()-1);
+        if (baseUrl != null && baseUrl.endsWith("/")) {
+            baseUrl = baseUrl.substring(0, baseUrl.length()-1);
         }
         this.id = info.getUrl();
@@ -129,10 +129,10 @@
     @Override
     public int lonToX(double lon, int zoom) {
-        return (int )osmMercator.LonToX(lon, zoom);
+        return (int) osmMercator.LonToX(lon, zoom);
     }
 
     @Override
     public int latToY(double lat, int zoom) {
-        return (int )osmMercator.LatToY(lat, zoom);
+        return (int) osmMercator.LatToY(lat, zoom);
     }
 
@@ -140,6 +140,6 @@
     public Point latLonToXY(double lat, double lon, int zoom) {
         return new Point(
-                (int)osmMercator.LonToX(lon, zoom),
-                (int)osmMercator.LatToY(lat, zoom)
+                (int) osmMercator.LonToX(lon, zoom),
+                (int) osmMercator.LatToY(lat, zoom)
                 );
     }
@@ -243,5 +243,4 @@
         return 0;
     }
-
 
     @Override
@@ -284,5 +283,5 @@
 
     private int getTileMax(int zoom) {
-        return (int)Math.pow(2.0, zoom) - 1;
+        return (int) Math.pow(2.0, zoom) - 1;
     }
 }
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTileSource.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTileSource.java	(revision 31429)
@@ -9,5 +9,5 @@
 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
 
-abstract public class AbstractTileSource implements TileSource {
+public abstract class AbstractTileSource implements TileSource {
 
     protected String attributionText;
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java	(revision 31429)
@@ -102,7 +102,8 @@
             imageryZoomMax = Integer.parseInt(xpath.compile("//ImageryMetadata/ZoomMax/text()").evaluate(document));
 
-            NodeList subdomainTxt = (NodeList) xpath.compile("//ImageryMetadata/ImageUrlSubdomains/string/text()").evaluate(document, XPathConstants.NODESET);
+            NodeList subdomainTxt = (NodeList) xpath.compile("//ImageryMetadata/ImageUrlSubdomains/string/text()")
+                    .evaluate(document, XPathConstants.NODESET);
             subdomains = new String[subdomainTxt.getLength()];
-            for(int i = 0; i < subdomainTxt.getLength(); i++) {
+            for (int i = 0; i < subdomainTxt.getLength(); i++) {
                 subdomains[i] = subdomainTxt.item(i).getNodeValue();
             }
@@ -119,5 +120,6 @@
             XPathExpression eastLonXpath = xpath.compile("BoundingBox/EastLongitude/text()");
 
-            NodeList imageryProviderNodes = (NodeList) xpath.compile("//ImageryMetadata/ImageryProvider").evaluate(document, XPathConstants.NODESET);
+            NodeList imageryProviderNodes = (NodeList) xpath.compile("//ImageryMetadata/ImageryProvider")
+                    .evaluate(document, XPathConstants.NODESET);
             List<Attribution> attributions = new ArrayList<>(imageryProviderNodes.getLength());
             for (int i = 0; i < imageryProviderNodes.getLength(); i++) {
@@ -127,5 +129,5 @@
 
                 NodeList coverageAreaNodes = (NodeList) coverageAreaXpath.evaluate(providerNode, XPathConstants.NODESET);
-                for(int j = 0; j < coverageAreaNodes.getLength(); j++) {
+                for (int j = 0; j < coverageAreaNodes.getLength(); j++) {
                     Node areaNode = coverageAreaNodes.item(j);
                     Attribution attr = new Attribution();
@@ -160,5 +162,5 @@
     @Override
     public int getMaxZoom() {
-        if(imageryZoomMax != null)
+        if (imageryZoomMax != null)
             return imageryZoomMax;
         else
@@ -194,4 +196,7 @@
                 for (int i = 0; i < 5 && getAttribution() == null; i++) {
                     // Makes sure attribution is loaded
+                    if (JMapViewer.debug) {
+                        System.out.println("Bing attribution attempt " + (i+1));
+                    }
                 }
                 if (brandLogoUri != null && !brandLogoUri.isEmpty()) {
@@ -259,4 +264,5 @@
             throw new RuntimeException(ex.getCause());
         } catch (InterruptedException ign) {
+            System.err.println("InterruptedException: " + ign.getMessage());
         }
         return null;
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java	(revision 31429)
@@ -14,5 +14,5 @@
         private static final String PATTERN = "https://%s.tile.openstreetmap.org";
 
-        private static final String[] SERVER = { "a", "b", "c" };
+        private static final String[] SERVER = {"a", "b", "c"};
 
         private int SERVER_NUM = 0;
@@ -27,5 +27,5 @@
         @Override
         public String getBaseUrl() {
-            String url = String.format(this.baseUrl, new Object[] { SERVER[SERVER_NUM] });
+            String url = String.format(this.baseUrl, new Object[] {SERVER[SERVER_NUM]});
             SERVER_NUM = (SERVER_NUM + 1) % SERVER.length;
             return url;
@@ -49,5 +49,5 @@
         private static final String PATTERN = "http://%s.tile.opencyclemap.org/cycle";
 
-        private static final String[] SERVER = { "a", "b", "c" };
+        private static final String[] SERVER = {"a", "b", "c"};
 
         private int SERVER_NUM = 0;
@@ -62,5 +62,5 @@
         @Override
         public String getBaseUrl() {
-            String url = String.format(this.baseUrl, new Object[] { SERVER[SERVER_NUM] });
+            String url = String.format(this.baseUrl, new Object[] {SERVER[SERVER_NUM]});
             SERVER_NUM = (SERVER_NUM + 1) % SERVER.length;
             return url;
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java	(revision 31429)
@@ -1,3 +1,3 @@
-// License: BSD or GPL. For details, see Readme.txt file.
+// License: GPL. For details, see Readme.txt file.
 package org.openstreetmap.gui.jmapviewer.tilesources;
 
@@ -6,5 +6,5 @@
 import org.openstreetmap.gui.jmapviewer.OsmMercator;
 
-/*
+/**
  * This tilesource uses different to OsmMercator projection.
  *
@@ -18,5 +18,4 @@
  * TODO: correct getDistance() method.
  */
-
 public class ScanexTileSource extends TMSTileSource {
     private static final String DEFAULT_URL = "http://maps.kosmosnimki.ru";
@@ -35,7 +34,9 @@
             this.uri = uri;
         }
+
         public String getName() {
             return name;
         }
+
         public String getUri() {
             return uri;
@@ -66,10 +67,10 @@
     @Override
     public String getExtension() {
-        return("jpeg");
+        return "jpeg";
     }
 
     @Override
     public String getTilePath(int zoom, int tilex, int tiley) {
-        int tmp = (int)Math.pow(2.0, zoom - 1);
+        int tmp = (int) Math.pow(2.0, zoom - 1);
 
         tilex = tilex - tmp;
@@ -84,5 +85,4 @@
     }
 
-
     /*
      * Latitude to Y and back calculations.
@@ -94,10 +94,10 @@
     @Override
     public int latToY(double lat, int zoom) {
-        return (int )(latToTileY(lat, zoom) * tileSize);
+        return (int) (latToTileY(lat, zoom) * tileSize);
     }
 
     @Override
     public double YToLat(int y, int zoom) {
-        return tileYToLat((double )y / tileSize, zoom);
+        return tileYToLat((double) y / tileSize, zoom);
     }
 
@@ -112,5 +112,5 @@
     @Override
     public double tileYToLat(int y, int zoom) {
-        return tileYToLat((double )y, zoom);
+        return tileYToLat((double) y, zoom);
     }
 
@@ -133,5 +133,5 @@
                 Random r = new Random();
                 lat = OsmMercator.MIN_LAT +
-                  r.nextInt((int )(OsmMercator.MAX_LAT - OsmMercator.MIN_LAT));
+                  r.nextInt((int) (OsmMercator.MAX_LAT - OsmMercator.MIN_LAT));
             }
         } while ((Math.abs(lat0 - lat) > 0.000001));
@@ -144,9 +144,9 @@
     /* Next term in Newton's polynomial */
     private double NextTerm(double lat, double y, int zoom) {
-        double sinl=Math.sin(lat);
-        double cosl=Math.cos(lat);
+        double sinl = Math.sin(lat);
+        double cosl = Math.cos(lat);
         double ec, f, df;
 
-        zoom = (int )Math.pow(2.0, zoom - 1);
+        zoom = (int) Math.pow(2.0, zoom - 1);
         ec = Math.exp((1 - y/zoom)*Math.PI);
 
@@ -154,5 +154,5 @@
             ec * Math.pow(Math.tan(Math.PI/4 + Math.asin(E * sinl)/2), E));
         df = 1/(1 - sinl) - ec * E * cosl/((1 - E * sinl) *
-            (Math.sqrt (1 - E * E * sinl * sinl)));
+            (Math.sqrt(1 - E * E * sinl * sinl)));
 
         return (f/df);
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java	(revision 31429)
@@ -52,5 +52,5 @@
     /**
      * Creates Templated TMS Tile Source based on ImageryInfo
-     * @param info
+     * @param info imagery info
      */
     public TemplatedTMSTileSource(TileSourceInfo info) {
@@ -73,5 +73,5 @@
         Matcher matcher = pattern.matcher(baseUrl);
         while (matcher.find()) {
-            headers.put(matcher.group(1),matcher.group(2));
+            headers.put(matcher.group(1), matcher.group(2));
             matcher.appendReplacement(output, "");
         }
@@ -89,10 +89,10 @@
         Matcher m = Pattern.compile(".*"+PATTERN_ZOOM+".*").matcher(this.baseUrl);
         if (m.matches()) {
-            if(m.group(1) != null) {
+            if (m.group(1) != null) {
                 finalZoom = Integer.valueOf(m.group(1))-zoom;
             }
-            if(m.group(2) != null) {
+            if (m.group(2) != null) {
                 String ofs = m.group(2);
-                if(ofs.startsWith("+"))
+                if (ofs.startsWith("+"))
                     ofs = ofs.substring(1);
                 finalZoom += Integer.valueOf(ofs);
@@ -103,6 +103,6 @@
             .replaceAll(PATTERN_X, Integer.toString(tilex))
             .replaceAll(PATTERN_Y, Integer.toString(tiley))
-            .replaceAll(PATTERN_Y_YAHOO, Integer.toString((int)Math.pow(2, zoom-1)-1-tiley))
-            .replaceAll(PATTERN_NEG_Y, Integer.toString((int)Math.pow(2, zoom)-1-tiley));
+            .replaceAll(PATTERN_Y_YAHOO, Integer.toString((int) Math.pow(2, zoom-1)-1-tiley))
+            .replaceAll(PATTERN_NEG_Y, Integer.toString((int) Math.pow(2, zoom)-1-tiley));
         if (rand != null) {
             r = r.replaceAll(PATTERN_SWITCH, randomParts[rand.nextInt(randomParts.length)]);
@@ -113,8 +113,8 @@
     /**
      * Checks if url is acceptable by this Tile Source
-     * @param url
+     * @param url URL to check
      */
     public static void checkUrl(String url) {
-        assert url != null && !"".equals(url): "URL cannot be null or empty";
+        assert url != null && !"".equals(url) : "URL cannot be null or empty";
         Matcher m = Pattern.compile("\\{[^}]*\\}").matcher(url);
         while (m.find()) {
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java	(revision 31428)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java	(revision 31429)
@@ -1,3 +1,3 @@
-// License: GPL. For details, see LICENSE file.
+// License: GPL. For details, see Readme.txt file.
 package org.openstreetmap.gui.jmapviewer.tilesources;
 
Index: /applications/viewer/jmapviewer/tools/checkstyle/jmapviewer_checks.xml
===================================================================
--- /applications/viewer/jmapviewer/tools/checkstyle/jmapviewer_checks.xml	(revision 31428)
+++ /applications/viewer/jmapviewer/tools/checkstyle/jmapviewer_checks.xml	(revision 31429)
@@ -97,5 +97,5 @@
   </module>
   <module name="Header">
-    <property name="header" value="// License: GPL. For details, see LICENSE file."/>
+    <property name="header" value="// License: GPL. For details, see Readme.txt file."/>
     <property name="fileExtensions" value=".java"/>
   </module>
