- Timestamp:
- 2008-10-05T13:30:59+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r999 r1019 14 14 import java.util.Collection; 15 15 import java.util.LinkedList; 16 import java.util.Locale; 16 17 17 18 import javax.swing.ImageIcon; … … 44 45 protected ElemStyles styles; 45 46 protected double circum; 47 protected String regionalNameOrder[]; 46 48 47 49 protected boolean isZoomOk(ElemStyle e) { … … 226 228 int w = icon.getIconWidth(), h=icon.getIconHeight(); 227 229 icon.paintIcon ( Main.map.mapView, g, p.x-w/2, p.y-h/2 ); 228 String name = (n.keys==null) ? null : n.keys.get("name");230 String name = getNodeName(n); 229 231 if (name!=null && annotate) 230 232 { … … 240 242 g.drawRect (p.x-w/2-2,p.y-w/2-2, w+4, h+4); 241 243 } 244 } 245 246 protected String getNodeName(Node n) { 247 String name = null; 248 if (n.keys != null) { 249 for (int i = 0; i < regionalNameOrder.length; i++) { 250 name = n.keys.get(regionalNameOrder[i]); 251 if (name != null) break; 252 } 253 } 254 return name; 242 255 } 243 256 … … 322 335 styles = MapPaintStyles.getStyles(); 323 336 orderFont = new Font(Main.pref.get("mappaint.font","Helvetica"), Font.PLAIN, Main.pref.getInteger("mappaint.fontsize", 8)); 337 String currentLocale = Locale.getDefault().getLanguage(); 338 regionalNameOrder = Main.pref.get("mappaint.nameOrder", "name:"+currentLocale+";name;int_name").split(";"); 324 339 325 340 if(styles.hasAreas())
Note:
See TracChangeset
for help on using the changeset viewer.