Class KmlImageCoordinate
- java.lang.Object
-
- com.esri.arcgisruntime.ogc.kml.KmlImageCoordinate
-
public final class KmlImageCoordinate extends java.lang.ObjectA KML image coordinate system.According to the OGC 2.3 specification in section 16.26.2 "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
KmlUnitsTypeenumeration (either viagetXUnits()andgetYUnits()or via theKmlImageCoordinate(double, double, KmlUnitsType, KmlUnitsType)constructor) to establish the KML image coordinate system. TheKmlUnitsType.PIXELSandKmlUnitsType.INSET_PIXELSimage coordinate systems are defined with device-independent pixels (dips).- Since:
- 100.6.0
-
-
Constructor Summary
Constructors Constructor Description KmlImageCoordinate(double x, double y, KmlUnitsType xUnitsType, KmlUnitsType yUnitsType)Constructs a KmlImageCoordinate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetX()Gets the x component of a point on the screen.KmlUnitsTypegetXUnits()The units in which the x value is specified.doublegetY()Gets the y component of a point on the screen.KmlUnitsTypegetYUnits()The units in which the y value is specified.
-
-
-
Constructor Detail
-
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 isKmlUnitsType.FRACTION.yUnitsType- units in which the y value is specified. Default isKmlUnitsType.FRACTION.- Throws:
java.lang.IllegalArgumentException- if xUnitsType or yUnitsType is null- Since:
- 100.6.0
-
-
Method Detail
-
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
-
-