Ignore:
Timestamp:
2013-12-10T22:02:45+01:00 (12 years ago)
Author:
malcolmh
Message:

save

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/seamap/Rules.java

    r30120 r30123  
    381381                                        Renderer.lineSymbols(feature, Areas.CableDash, 0, Areas.CableDot, null, 2, Color.black);
    382382                                }
     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                                }
    383390                        }
    384391                }
     
    876883
    877884        private static void pipelines(Feature feature) {
    878                 if (zoom >= 14) {
     885                if ((zoom >= 16) && (feature.length < 2)) {
    879886                        if (feature.type == Obj.PIPSOL) {
    880887                                Renderer.lineSymbols(feature, Areas.Pipeline, 1.0, null, null, 0, Renderer.Mline);
    881888                        } 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                                }
    883902                        }
    884903                }
     
    961980        private static void stations(Feature feature) {
    962981                if (zoom >= 14) {
     982                        String str = "";
    963983                        switch (feature.type) {
    964984                        case SISTAT:
    965985                        case SISTAW:
    966986                                Renderer.symbol(feature, Harbours.SignalStation);
    967                                 String str = "SS";
     987                                str = "SS";
    968988                                //  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)));
    970989                                break;
    971990                        case RDOSTA:
     
    9821001                        case CGUSTA:
    9831002                                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";
    9851004                                break;
    9861005                        case RSCSTA:
    9871006                                Renderer.symbol(feature, Harbours.Rescue);
    9881007                                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)));
    9891011                        }
    9901012                }
Note: See TracChangeset for help on using the changeset viewer.