Changeset 23907 in osm for applications
- Timestamp:
- 2010-10-29T13:20:34+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pdfimport/src/pdfimport/OsmBuilder.java
r23861 r23907 31 31 public double maxNorth = 10000; 32 32 33 private final Map<String, String> stringsMap = new HashMap<String, String>(); 34 35 33 36 public OsmBuilder() 34 37 { … … 135 138 if (full) { 136 139 keys.put("PDF_nr", "" + path.nr); 137 keys.put("PDF_layer", "" + path.layer.info.nr); 138 keys.put("PDF_closed", "" + path.isClosed()); 140 keys.put("PDF_layer", this.getString("" + path.layer.info.nr)); 141 142 if (path.isClosed()){ 143 keys.put("PDF_closed", "yes"); 144 } 139 145 140 146 if (path.layer.info.fill){ … … 160 166 } 161 167 168 169 private String getString(String string) { 170 if (this.stringsMap.containsKey(string)) { 171 return this.stringsMap.get(string); 172 } else { 173 this.stringsMap.put(string, string); 174 return string; 175 } 176 } 177 162 178 private String printColor(Color col){ 163 return "#" + Integer.toHexString(col.getRGB() & 0xffffff); 179 String s = "#" + Integer.toHexString(col.getRGB() & 0xffffff); 180 return getString(s); 164 181 } 165 182
Note:
See TracChangeset
for help on using the changeset viewer.