Changeset 30123 in osm for applications/editors/josm/plugins/smed2/src/seamap/Rules.java
- Timestamp:
- 2013-12-10T22:02:45+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/seamap/Rules.java
r30120 r30123 381 381 Renderer.lineSymbols(feature, Areas.CableDash, 0, Areas.CableDot, null, 2, Color.black); 382 382 } 383 if (atts != null) { 384 if (atts.containsKey(Att.VERCLR)) { 385 Renderer.labelText(feature, String.valueOf((Double) atts.get(Att.VERCLR).val), new Font("Arial", Font.PLAIN, 50), LabelStyle.VCLR, Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,25))); 386 } else if (atts.containsKey(Att.VERCSA)) { 387 Renderer.labelText(feature, String.valueOf((Double) atts.get(Att.VERCSA).val), new Font("Arial", Font.PLAIN, 50), LabelStyle.PCLR, Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,25))); 388 } 389 } 383 390 } 384 391 } … … 876 883 877 884 private static void pipelines(Feature feature) { 878 if (zoom >= 1 4) {885 if ((zoom >= 16) && (feature.length < 2)) { 879 886 if (feature.type == Obj.PIPSOL) { 880 887 Renderer.lineSymbols(feature, Areas.Pipeline, 1.0, null, null, 0, Renderer.Mline); 881 888 } else if (feature.type == Obj.PIPOHD) { 882 889 Renderer.lineVector(feature, new LineStyle(Color.black, 8)); 890 AttMap atts = feature.objs.get(Obj.PIPOHD).get(0); 891 double verclr = 0; 892 if (atts != null) { 893 if (atts.containsKey(Att.VERCLR)) { 894 verclr = (Double) atts.get(Att.VERCLR).val; 895 } else { 896 verclr = atts.containsKey(Att.VERCSA) ? (Double) atts.get(Att.VERCSA).val : 0; 897 } 898 if (verclr > 0) { 899 Renderer.labelText(feature, String.valueOf(verclr), new Font("Arial", Font.PLAIN, 50), LabelStyle.VCLR, Color.black, new Delta(Handle.TC, AffineTransform.getTranslateInstance(0,25))); 900 } 901 } 883 902 } 884 903 } … … 961 980 private static void stations(Feature feature) { 962 981 if (zoom >= 14) { 982 String str = ""; 963 983 switch (feature.type) { 964 984 case SISTAT: 965 985 case SISTAW: 966 986 Renderer.symbol(feature, Harbours.SignalStation); 967 Stringstr = "SS";987 str = "SS"; 968 988 // Append (cat) to str 969 Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.LC, AffineTransform.getTranslateInstance(30, 0)));970 989 break; 971 990 case RDOSTA: … … 982 1001 case CGUSTA: 983 1002 Renderer.symbol(feature, Harbours.SignalStation); 984 Renderer.labelText(feature, "CG", new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.LC, AffineTransform.getTranslateInstance(30, 0)));1003 str = "CG"; 985 1004 break; 986 1005 case RSCSTA: 987 1006 Renderer.symbol(feature, Harbours.Rescue); 988 1007 break; 1008 } 1009 if ((zoom >= 15) && !str.isEmpty()) { 1010 Renderer.labelText(feature, str, new Font("Arial", Font.PLAIN, 40), LabelStyle.NONE, Color.black, null, new Delta(Handle.LC, AffineTransform.getTranslateInstance(30, 0))); 989 1011 } 990 1012 }
Note:
See TracChangeset
for help on using the changeset viewer.