Class SymbolAnchor


  • public final class SymbolAnchor
    extends java.lang.Object
    Represents the anchor point of a symbol layer, including placement mode and anchor position values. Instances of this class are immutable. To change the symbol anchor values on a MarkerSymbolLayer, create a new SymbolAnchor and set it on the symbol layer with MarkerSymbolLayer.setAnchor(SymbolAnchor).
    Since:
    100.5.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SymbolAnchor.PlacementMode
      Represents the ways in which symbol anchor values may be specified.
    • Constructor Summary

      Constructors 
      Constructor Description
      SymbolAnchor​(double x, double y, SymbolAnchor.PlacementMode placementMode)
      Creates a symbol anchor with the given anchor values and placement mode.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SymbolAnchor.PlacementMode getPlacementMode()
      Gets the anchor placement mode of the symbol anchor.
      double getX()
      Gets the x-component of the symbol anchor.
      double getY()
      Gets the y-component of the symbol anchor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SymbolAnchor

        public SymbolAnchor​(double x,
                            double y,
                            SymbolAnchor.PlacementMode placementMode)
        Creates a symbol anchor with the given anchor values and placement mode.
        Parameters:
        x - the X anchor value
        y - the Y anchor value
        placementMode - the placement mode
        Throws:
        java.lang.IllegalArgumentException - if placementMode is null
        Since:
        100.5.0
    • Method Detail

      • getX

        public double getX()
        Gets the x-component of the symbol anchor. The x-component can be any real number. The units of the value depend on the SymbolAnchor.PlacementMode. The default value is 0, regardless of placement mode.
        Returns:
        the x-component
        Since:
        100.5.0
      • getY

        public double getY()
        Gets the y-component of the symbol anchor. The y-component can be any real number. The units of the value depend on the SymbolAnchor.PlacementMode. The default value is 0, regardless of placement mode.
        Returns:
        the y-component
        Since:
        100.5.0