Ignore:
Timestamp:
2017-10-11T20:42:06+02:00 (2 years ago)
Author:
Don-vip
Message:

fix #14132 - MapCSS crossing operator must check layer attribute first

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java

    r12187 r12986  
    139139        return p;
    140140    }
     141
     142    /**
     143     * Returns the layer value of primitive (null for layer 0).
     144     * @param w OSM primitive
     145     * @return the value of "layer" key, or null if absent or set to 0 (default value)
     146     * @since 12986
     147     */
     148    public static String getLayer(OsmPrimitive w) {
     149        String layer1 = w.get("layer");
     150        if ("0".equals(layer1)) {
     151            layer1 = null; // 0 is default value for layer.
     152        }
     153        return layer1;
     154    }
    141155}
Note: See TracChangeset for help on using the changeset viewer.