Changeset 30733 in osm for applications/editors/josm/plugins/epci-fr/src/org
- Timestamp:
- 2014-10-18T16:33:42+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/epci-fr/src/org/openstreetmap/josm/plugins/fr/epci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/epci-fr/src/org/openstreetmap/josm/plugins/fr/epci/EpciNameFormatter.java
r26913 r30733 11 11 */ 12 12 public class EpciNameFormatter implements NameFormatterHook { 13 14 15 13 14 @Override 15 public String checkRelationTypeName(IRelation relation, String defaultName) { 16 16 if (relation == null) return null; 17 String local_authority_FR = relation.get("local_authority:FR");18 if (local _authority_FR != null) {19 return (defaultName != null ? defaultName : "") +20 "["+(local_authority_FR.equals("metropole") ? "MP" : local_authority_FR)+"]";17 String localAuthorityFR = relation.get("local_authority:FR"); 18 if (localAuthorityFR != null) { 19 return (defaultName != null ? defaultName : "") + 20 "["+("metropole".equals(localAuthorityFR) ? "MP" : localAuthorityFR)+"]"; 21 21 } else { 22 22 return null; 23 23 } 24 24 } 25 25 26 27 28 29 26 @Override 27 public String checkFormat(INode node, String defaultName) { 28 return null; 29 } 30 30 31 32 33 34 31 @Override 32 public String checkFormat(IWay node, String defaultName) { 33 return null; 34 } 35 35 36 37 38 39 36 @Override 37 public String checkFormat(IRelation node, String defaultName) { 38 return null; 39 } 40 40 } -
applications/editors/josm/plugins/epci-fr/src/org/openstreetmap/josm/plugins/fr/epci/EpciPlugin.java
r26913 r30733 15 15 public class EpciPlugin extends Plugin { 16 16 17 18 19 20 21 22 23 17 /** 18 * @param info 19 */ 20 public EpciPlugin(PluginInformation info) { 21 super(info); 22 DefaultNameFormatter.registerFormatHook(new EpciNameFormatter()); 23 } 24 24 }
Note:
See TracChangeset
for help on using the changeset viewer.