Class KmlImageCoordinate

java.lang.Object
com.esri.arcgisruntime.ogc.kml.KmlImageCoordinate

public final class KmlImageCoordinate extends Object
A KML image coordinate system.

According to the OGC 2.3 specification in section 16.26.2 (https://docs.opengeospatial.org/is/12-007r2/12-007r2.html#1254) "Specifies an image coordinate system. The x and y values may each be specified in three different ways - as pixels (pixels), as fractions of the icon (fraction), or as inset pixels (insetPixels), which is an offset in pixels from the upper right corner of the icon. They may or may not be specified in a consistent manner - for example, x can be specified in pixels and y as a fraction."

Use the KmlUnitsType enumeration (either via getXUnits() and getYUnits() or via the KmlImageCoordinate(double, double, KmlUnitsType, KmlUnitsType) constructor) to establish the KML image coordinate system. The KmlUnitsType.PIXELS and KmlUnitsType.INSET_PIXELS image coordinate systems are defined with device-independent pixels (dips).

Since:
100.6.0
  • Constructor Details

    • KmlImageCoordinate

      public KmlImageCoordinate(double x, double y, KmlUnitsType xUnitsType, KmlUnitsType yUnitsType)
      Constructs a KmlImageCoordinate.
      Parameters:
      x - x component of a point on the screen. Default is 0.5.
      y - y component of a point on the screen. Default is 0.5.
      xUnitsType - units in which the x value is specified. Default is KmlUnitsType.FRACTION.
      yUnitsType - units in which the y value is specified. Default is KmlUnitsType.FRACTION.
      Throws:
      IllegalArgumentException - if xUnitsType or yUnitsType is null
      Since:
      100.6.0
  • Method Details

    • getX

      public double getX()
      Gets the x component of a point on the screen.
      Returns:
      x component of a point on the screen
      Since:
      100.6.0
    • getY

      public double getY()
      Gets the y component of a point on the screen.
      Returns:
      y component of a point on the screen
      Since:
      100.6.0
    • getXUnits

      public KmlUnitsType getXUnits()
      The units in which the x value is specified.
      Returns:
      a KmlUnitsType
      Since:
      100.6.0
    • getYUnits

      public KmlUnitsType getYUnits()
      The units in which the y value is specified.
      Returns:
      a KmlUnitsType
      Since:
      100.6.0