Class MultilayerPolylineSymbol

  • All Implemented Interfaces:

    public final class MultilayerPolylineSymbol
    extends MultilayerSymbol
    Used to render polyline geometries, these symbols are built from multiple layers of symbols. They may be returned from polyline feature layers based on web maps, feature services, or mobile map packages, and can also be created from JSON by calling Symbol.fromJson(String).

    The symbol layers that comprise a MultilayerPolylineSymbol can be of different symbol types. For example, a MultilayerPolylineSymbol may contain a line (stroke) symbol layer to draw a solid road, a second line symbol layer with a dashed stroke to draw the road centerline, and a point (marker) symbol layer that is drawn at specified locations along the polyline. The layers that comprise the symbol can be accessed through MultilayerSymbol.getSymbolLayers(). Some properties can also be changed programmatically - the color and line width. For more information about multilayer symbols, refer to Symbols in the ArcGIS Pro help.

    • Constructor Detail

      • MultilayerPolylineSymbol

        public MultilayerPolylineSymbol​(Iterable<SymbolLayer> symbolLayers)
        Creates a multilayer polyline symbol from the given symbol layers. Any modification of the given collection of symbol layers will be ignored, use MultilayerSymbol.getSymbolLayers() to add or remove symbol layers. By default the color is 0x00000000 (no color) and the width is inferred from the given layers.
        symbolLayers - symbol layers for the symbol, cannot be null
        IllegalArgumentException - if symbolLayers is null
    • Method Detail

      • setWidth

        public void setWidth​(float width)
        Sets the width of the symbol.

        When getting the width from a multilayer polyline symbol, the value reported is the largest width of all the symbol layers it contains. The symbol width is updated when its symbol layer widths change (if there is a new largest layer width). When setting a new width at the polyline symbol level, the width of the largest symbol layer is given the provided value, and all the smaller layers are sized proportionately. An individual symbol layer can be given a specific width without affecting the other layers.

        width - the width, in density-independent pixels (dp)
        IllegalArgumentException - if width is less than zero
      • getWidth

        public float getWidth()
        Gets the width of the symbol.
        the width, in density-independent pixels (dp)
        See Also: