Changeset 384 in josm


Ignore:
Timestamp:
Oct 14, 2007 8:29:54 PM (6 years ago)
Author:
framm
Message:
  • limit lat/lon decimal places to 7
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/NameVisitor.java

    r383 r384  
    55import static org.openstreetmap.josm.tools.I18n.trn; 
    66 
     7import java.text.DecimalFormat; 
     8import java.text.NumberFormat; 
    79import java.util.HashSet; 
    810import java.util.Set; 
     
    3840        public Icon icon; 
    3941         
     42        /**  
     43         * For formatting lat/lon 
     44         */ 
     45        public static NumberFormat latLonFormat = new DecimalFormat("###0.0000000"); 
    4046         
    4147        /** 
     
    4652                name = n.get("name"); 
    4753                if (name == null) 
    48                         name = (n.id==0?"":""+n.id)+" ("+n.coor.lat()+","+n.coor.lon()+")"; 
     54                        name = (n.id==0?"":""+n.id)+" ("+latLonFormat.format(n.coor.lat())+", "+latLonFormat.format(n.coor.lon())+")"; 
    4955                addId(n); 
    5056                icon = ImageProvider.get("data", "node"); 
Note: See TracChangeset for help on using the changeset viewer.