A KML icon defines the image associated with an overlay or an icon style.
- Since:
- 100.6.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGets the icon's refresh interval.Gets the icon's refresh mode.getURI()Gets the icon's image file URI.Gets the icon's view refresh mode.longGets the icon's view refresh time.voidsetRefreshInterval(long refreshInterval) Sets the icon's refresh interval.voidsetRefreshMode(KmlRefreshMode kmlRefreshMode) Sets the icon's refresh mode.voidsetViewRefreshMode(KmlViewRefreshMode viewRefreshMode) Sets the icon's view refresh mode.voidsetViewRefreshTime(long viewRefreshTime) Sets the icon's view refresh time.
-
Constructor Details
-
KmlIcon
Constructs a KmlIcon from the given URI.The URI defines the location of the image to be used as the overlay or placemark symbol. Its location can either be on a local file system or on a remote web server. A default icon will be used if uri is null or empty.
- Parameters:
uri- a URI path to an image file- Since:
- 100.6.0
-
-
Method Details
-
getRefreshInterval
public long getRefreshInterval()Gets the icon's refresh interval.- Returns:
- the refresh interval in milliseconds
- Since:
- 100.6.0
-
setRefreshInterval
public void setRefreshInterval(long refreshInterval) Sets the icon's refresh interval.If the refresh interval is greater than zero, the image is refreshed every n milliseconds; if it is set to zero, the image is loaded only once; if it is not set and the refresh mode is {
KmlRefreshMode.ON_INTERVAL} initially, the refresh interval will be set to 4000 milliseconds by default.- Parameters:
refreshInterval- the refresh interval in milliseconds- Throws:
IllegalArgumentException- if refreshInterval is negative- Since:
- 100.6.0
-
getRefreshMode
Gets the icon's refresh mode.- Returns:
- a KmlRefreshMode
- Since:
- 100.6.0
-
setRefreshMode
Sets the icon's refresh mode.- Parameters:
kmlRefreshMode- a KmlRefreshMode- Throws:
IllegalArgumentException- if kmlRefreshMode is null- Since:
- 100.6.0
-
getURI
Gets the icon's image file URI.- Returns:
- the icon's image file URI
- Since:
- 100.6.0
-
getViewRefreshMode
Gets the icon's view refresh mode.- Returns:
- a KmlViewRefreshMode
- Since:
- 100.6.0
-
setViewRefreshMode
Sets the icon's view refresh mode.- Parameters:
viewRefreshMode- a KmlViewRefreshMode- Throws:
IllegalArgumentException- if viewRefreshMode is null- Since:
- 100.6.0
-
getViewRefreshTime
public long getViewRefreshTime()Gets the icon's view refresh time.It is the number of milliseconds to wait before refreshing the icon after camera movement stops.
- Returns:
- the icon's view refresh time in milliseconds
- Since:
- 100.6.0
-
setViewRefreshTime
public void setViewRefreshTime(long viewRefreshTime) Sets the icon's view refresh time.It is the number of milliseconds to wait before refreshing the icon after camera movement stops. If viewRefreshTime is not set when the mode is set to {
KmlViewRefreshMode.ON_STOP}, it will automatically be set to 4000 milliseconds.- Parameters:
viewRefreshTime- the icon's view refresh time in milliseconds- Throws:
IllegalArgumentException- if viewRefreshTime is negative- Since:
- 100.6.0
-