Ignore:
Timestamp:
2014-03-16T14:21:57+01:00 (11 years ago)
Author:
malcolmh
Message:

save

File:
1 edited

Legend:

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

    r30323 r30325  
    351351                                }
    352352                        } else {
    353                                 Renderer.symbol(feature, Beacons.Shapes.get(shape),
    354                                                 getScheme(feature, feature.type));
    355                                 if (feature.objs.get(Obj.TOPMAR) != null)
    356                                         Renderer.symbol(
    357                                                         feature,
    358                                                         Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR)
    359                                                                         .get(0).get(Att.TOPSHP).val),
    360                                                         getScheme(feature, Obj.TOPMAR),
    361                                                         Topmarks.BeaconDelta);
     353                                Renderer.symbol(feature, Beacons.Shapes.get(shape), getScheme(feature, feature.type));
     354                                if (hasObject(feature, Obj.TOPMAR)) {
     355                                        Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val);
     356                                        if (topmark != null)
     357                                                Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.TOPMAR), Topmarks.BeaconDelta);
     358                                } else  if (hasObject(feature, Obj.DAYMAR)) {
     359                                        Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val);
     360                                        if (topmark != null)
     361                                                Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val), getScheme(feature, Obj.DAYMAR), Topmarks.BeaconDelta);
     362                                }
    362363                        }
    363364                        Signals.addSignals(feature);
     
    370371                        Renderer.symbol(feature, Buoys.Shapes.get(shape), getScheme(feature, feature.type));
    371372                        if (hasObject(feature, Obj.TOPMAR)) {
    372                                 Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val),
    373                                                 getScheme(feature, Obj.TOPMAR), Topmarks.BuoyDeltas.get(shape));
     373                                Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val);
     374                                if (topmark != null)
     375                                        Renderer.symbol(feature, topmark, getScheme(feature, Obj.TOPMAR), Topmarks.BuoyDeltas.get(shape));
     376                        } else if (hasObject(feature, Obj.DAYMAR)) {
     377                                Symbol topmark = Topmarks.Shapes.get(feature.objs.get(Obj.DAYMAR).get(0).get(Att.TOPSHP).val);
     378                                if (topmark != null)
     379                                        Renderer.symbol(feature, topmark, getScheme(feature, Obj.DAYMAR), Topmarks.BuoyDeltas.get(shape));
    374380                        }
    375381                        Signals.addSignals(feature);
     
    511517                        if (Renderer.zoom >= 14) {
    512518                                Renderer.symbol(feature, Harbours.Anchorage, new Scheme(Mline));
    513                         Renderer.labelText(feature, name == null ? "" : name, new Font("Arial", Font.PLAIN, 30), Msymb, LabelStyle.RRCT, Mline, Color.white, new Delta(Handle.BC));
     519                                if (Renderer.zoom >= 15) {
     520                                        Renderer.labelText(feature, name == null ? "" : name, new Font("Arial", Font.PLAIN, 30), Msymb, LabelStyle.RRCT, Mline, Color.white, new Delta(Handle.BC));
     521                                }
    514522                        }
    515523                        double radius = (Double)getAttVal(feature, Obj.ACHBRT, 0, Att.RADIUS);
Note: See TracChangeset for help on using the changeset viewer.