Class Icon

java.lang.Object
xyz.jpenilla.squaremap.api.marker.Marker
xyz.jpenilla.squaremap.api.marker.Icon

public final class Icon extends Marker
Icon marker, used to create an icon with an image on a map
  • Method Details

    • point

      public @NonNull Point point()
      Get the point where this icon will be located at
      Returns:
      point
    • point

      public void point(@NonNull Point point)
      Set a new location for this icon marker
      Parameters:
      point - new point
    • tooltipAnchor

      public @NonNull Point tooltipAnchor()
      Get the coordinates of the point from which popups will "open", relative to the icon anchor.
      Returns:
      point
    • tooltipAnchor

      public void tooltipAnchor(@NonNull Point tooltipAnchor)
      Set the coordinates of the point from which popups will "open", relative to the icon anchor.
      Parameters:
      tooltipAnchor - new point
    • anchor

      public @NonNull Point anchor()
      Get the coordinates of the "tip" of the icon (relative to its top left corner). The icon will be aligned so that this point is at the marker's geographical location. Centered by default if size is specified.
      Returns:
      point
    • anchor

      public void anchor(@NonNull Point anchor)
      Set the coordinates of the "tip" of the icon (relative to its top left corner). The icon will be aligned so that this point is at the marker's geographical location. Centered by default if size is specified.
      Parameters:
      anchor - new point
    • image

      public @NonNull Key image()
      Get the key for the currently used image
      Returns:
      key
    • image

      public void image(@NonNull Key image)
      Set the image to use for this icon. Must be registered with the icon registry
      Parameters:
      image - new image
      See Also:
    • sizeX

      public int sizeX()
      Get the x size
      Returns:
      x size
    • sizeX

      public void sizeX(int size)
      Set the x size
      Parameters:
      size - new size
    • sizeZ

      public int sizeZ()
      Get the z size
      Returns:
      z size
    • sizeZ

      public void sizeZ(int size)
      Set the z size
      Parameters:
      size - new size
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object