Package com.esri.arcgisruntime.ogc.kml
Class KmlIconStyle
- java.lang.Object
-
- com.esri.arcgisruntime.ogc.kml.KmlColorStyle
-
- com.esri.arcgisruntime.ogc.kml.KmlIconStyle
-
public final class KmlIconStyle extends KmlColorStyle
A KML icon style.- Since:
- 100.6.0
-
-
Constructor Summary
Constructors Constructor Description KmlIconStyle(KmlIcon kmlIcon, double scale)
Constructs a KmlIconStyle with the specified icon and scale.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getHeading()
Gets the direction in decimal degrees.KmlImageCoordinate
getHotSpot()
Gets the position within the icon that is anchored to the point specified in the KmlPlacemark.KmlIcon
getIcon()
Gets the icon used by the KmlPlacemark.double
getScale()
Gets the scale factor that is applied to resize the rendered icon.void
setHeading(double heading)
Sets the direction in decimal degrees.void
setHotSpot(KmlImageCoordinate kmlImageCoordinate)
Sets the position within the icon that is anchored to the point specified in the KmlPlacemark.void
setIcon(KmlIcon kmlIcon)
Sets the KML icon to be used by the KmlPlacemark.void
setScale(double scale)
Sets the scale factor that is applied to the rendered icon.-
Methods inherited from class com.esri.arcgisruntime.ogc.kml.KmlColorStyle
getColor, getColorMode, setColor, setColorMode
-
-
-
-
Constructor Detail
-
KmlIconStyle
public KmlIconStyle(KmlIcon kmlIcon, double scale)
Constructs a KmlIconStyle with the specified icon and scale.The default yellow pushpin icon will be used if kmlIcon is null or its URI is invalid. An icon with an incorrect or inaccessible URI will result in a red cross icon being used.
- Parameters:
kmlIcon
- an icon for drawing the point placemarkscale
- scale to resize the icon- Throws:
java.lang.IllegalArgumentException
- if scale is negative- Since:
- 100.6.0
-
-
Method Detail
-
setHeading
public void setHeading(double heading)
Sets the direction in decimal degrees.The value is used to set direction of image icon, its range is from 0 (North) to 360 degrees in clockwise. The default value is 0.
- Parameters:
heading
- the direction in decimal degrees- Since:
- 100.6.0
-
getHeading
public double getHeading()
Gets the direction in decimal degrees.The value is used to set direction of image icon, its range is from 0 (North) to 360 degrees in clockwise. The default value is 0.
- Returns:
- the direction in decimal degrees
- Since:
- 100.6.0
-
getScale
public double getScale()
Gets the scale factor that is applied to resize the rendered icon.- Returns:
- the scale factor
- Since:
- 100.6.0
-
setScale
public void setScale(double scale)
Sets the scale factor that is applied to the rendered icon.- Parameters:
scale
- the scale to resize the icon- Throws:
java.lang.IllegalArgumentException
- if scale is negative- Since:
- 100.6.0
-
getIcon
public KmlIcon getIcon()
Gets the icon used by the KmlPlacemark.A null icon will result in the default yellow pushpin icon being used. An icon with an incorrect or inaccessible URI will result in a red cross icon being used.
- Returns:
- a KmlIcon
- Since:
- 100.6.0
- See Also:
setIcon(KmlIcon)
-
setIcon
public void setIcon(KmlIcon kmlIcon)
Sets the KML icon to be used by the KmlPlacemark.A null icon will result in the default yellow pushpin icon being used.
- Parameters:
kmlIcon
- a KmlIcon- Since:
- 100.6.0
- See Also:
getIcon()
-
getHotSpot
public KmlImageCoordinate getHotSpot()
Gets the position within the icon that is anchored to the point specified in the KmlPlacemark.- Returns:
- a KmlImageCoordinate
- Since:
- 100.6.0
- See Also:
setHotSpot(KmlImageCoordinate)
-
setHotSpot
public void setHotSpot(KmlImageCoordinate kmlImageCoordinate)
Sets the position within the icon that is anchored to the point specified in the KmlPlacemark.- Parameters:
kmlImageCoordinate
- a KmlImageCoordinate- Since:
- 100.6.0
- See Also:
getHotSpot()
-
-