Ignore:
Timestamp:
2015-12-01T00:17:33+01:00 (8 years ago)
Author:
bastiK
Message:

mapcss: partial fill - fix for [9063] - use scale instead of circum (otherwise it would depend on latitude)

Location:
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintSettings.java

    r9071 r9076  
    117117        unclosedAreaHighlight = Main.pref.getBoolean("draw.unclosed_area_partial_fill_highlight", false);
    118118        unclosedAreaHighlightWidth = Main.pref.getDouble("draw.unclosed_area_partial_fill_highlight.width", 80);
    119         partialFillThreshold = Main.pref.getDouble("draw.area.partial_fill_threshold", 50);
     119        partialFillThreshold = Main.pref.getDouble("draw.area.partial_fill_threshold", 70);
    120120    }
    121121
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r9075 r9076  
    288288
    289289    private double circum;
     290    private double scale;
    290291
    291292    private MapPaintSettings paintSettings;
     
    630631                        AreaAndPerimeter ap = pd.getAreaAndPerimeter();
    631632                        // if partial fill would only leave a small gap in the center ...
    632                         if (ap.getPerimeter() * extent * circum / 100 > partialFillThreshold / 100 * ap.getArea()) {
     633                        if (ap.getPerimeter() * extent * scale > partialFillThreshold / 100 * ap.getArea()) {
    633634                            // ... turn it off and fill completely
    634635                            extent = null;
     
    660661            AreaAndPerimeter ap = Geometry.getAreaAndPerimeter(w.getNodes());
    661662            // if partial fill would only leave a small gap in the center ...
    662             if (ap.getPerimeter() * extent * circum / 100 > partialFillThreshold / 100 * ap.getArea()) {
     663            if (ap.getPerimeter() * extent * scale > partialFillThreshold / 100 * ap.getArea()) {
    663664                // ... turn it off and fill completely
    664665                extent = null;
     
    15131514
    15141515        circum = nc.getDist100Pixel();
     1516        scale = nc.getScale();
    15151517
    15161518        leftHandTraffic = Main.pref.getBoolean("mappaint.lefthandtraffic", false);
Note: See TracChangeset for help on using the changeset viewer.