Class VectorMarkerSymbolElement


  • public final class VectorMarkerSymbolElement
    extends java.lang.Object
    Represents an element within a VectorMarkerSymbolLayer. Each VectorMarkerSymbolElement is made up of a geometry and a symbol. The geometry of the VectorMarkerSymbolElement does not pertain to the geography of the map or scene. Rather, the geometry property describes the shape of the multilayer symbol held by the element. The coordinate values defining the geometry are only used to define the relative size and shape of elements and rely on the size from the VectorMarkerSymbolLayer to be sized on the screen. This behavior facilitates creating a custom VectorMarkerSymbolElement of custom shape and symbol, then combining it with zero or more additional elements to form a vector marker.

    For example, to create a red square, construct a VectorMarkerSymbolElement with a MultilayerPolygonSymbol that contains a red SolidFillSymbolLayer and a square geometry. When placed in a VectorMarkerSymbolLayer a red square will be displayed.

    The symbol and geometry properties must create a meaningful combination to have a visual effect. For example, a MultilayerPolygonSymbol will not be rendered if the corresponding geometry is a point, but does render if the geometry is a polygon.

    Since:
    100.5.0
    • Constructor Detail

      • VectorMarkerSymbolElement

        public VectorMarkerSymbolElement​(Geometry geometry,
                                         MultilayerSymbol symbol)
        Instantiates a new VectorMarkerSymbolElement with the given geometry and symbol.
        Parameters:
        geometry - the geometry for this symbol element
        symbol - the symbol for this symbol element
        Throws:
        java.lang.IllegalArgumentException - if geometry or symbol are null
        Since:
        100.5.0
    • Method Detail

      • getGeometry

        public Geometry getGeometry()
        Gets the geometry of this VectorMarkerSymbolElement. When rendering, the symbol draws according to the shape of the geometry.
        Returns:
        the geometry
        Since:
        100.5.0
      • setGeometry

        public void setGeometry​(Geometry geometry)
        Sets the geometry of this VectorMarkerSymbolElement. The geometry can be a point, polyline, or polygon. When rendering, the symbol draws according to the shape of the geometry. When setting a geometry, make sure that the corresponding symbol type is appropriate for the desired drawing effect. For instance, a polygon geometry should be paired with a MultilayerPolygonSymbol, which will draw the symbol inside the polygon geometry when rendered. The coordinate values defining the geometry are only used to define the relative size and shape of elements and rely on the size from the VectorMarkerSymbolLayer to be sized on the screen.
        Parameters:
        geometry - the geometry to set
        Throws:
        java.lang.IllegalArgumentException - if geometry is null
        Since:
        100.5.0
      • getSymbol

        public Symbol getSymbol()
        Gets the symbol of this VectorMarkerSymbolElement. When rendering, the symbol is drawn according to the shape of the geometry.
        Returns:
        the multilayer symbol
        Since:
        100.5.0
      • setSymbol

        public void setSymbol​(MultilayerSymbol symbol)
        Sets the symbol of this VectorMarkerSymbolElement. The symbol can be any arbitrary multilayer symbol. When rendering, the symbol draws according to the shape of the geometry. When setting a symbol, make sure that the corresponding geometry type is appropriate for the desired drawing effect. For instance, a polygon symbol should be paired with a polygon geometry.
        Parameters:
        symbol - the symbol to set
        Throws:
        java.lang.IllegalArgumentException - if symbol is null
        Since:
        100.5.0