| java.lang.Object | |||
| ↳ | com.esri.android.map.Layer | ||
| ↳ | com.esri.android.map.GroupLayer | ||
| ↳ | com.esri.android.map.ogc.KMLLayer | ||
The KMLLayer class represents a layer based on a KML file (.kml,.kmz). KML is an XML tag based syntax that holds
 geographic information (geometric shapes, symbology, and attributes) in a file with the .kml extension. To add a KML
 file(.kml or .kmz) to a map, the KML must be available via a publicly accessible URL. Locally hosted or KML files
 inside a firewall are not supported. KML Layer is a group layer which is made up of several layers in order to
 support wide range of feature types that can be stored in a KML file. Geometries from a KML file are stored as
 feature layers: one each for points, lines and polygons. The feature layer can be accessed by iterating the children
 of the GroupLayer.
| [Expand] Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
com.esri.android.map.Layer | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| KMLLayer(String url) The constructor is used if you are instantiating a KMLLayer using a publicly accessible URL. | |||||||||||
| KMLLayer(String url, SpatialReference outSR) The constructor is used if you are instantiating a KMLLayer using a URL and output spatial reference. | |||||||||||
| KMLLayer(String url, SpatialReference outSR, boolean initLayer) The constructor is used if you are instantiating a KMLLayer using a URL, output spatial reference and initLayer
 indicator. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| boolean | isInitialized() The initialization of a GroupLayer is depended upon if it is empty (return false ) or its first layer being
 initialized. | ||||||||||
| void | recycle() Releases resources referenced by the Layer so that they can be recycled. | ||||||||||
| void | refresh() Refreshes the KML layer by downloading and parsing the KML document. | ||||||||||
| void | setVisible(boolean visible) Sets the visibility of the Layer. | ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void | initLayer() Initializes the layer. | ||||||||||
| void | updateSpatialReferenceStatus(int SRStatus) The callback method is invoked when the layer is added to map. | ||||||||||
| [Expand] Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
  com.esri.android.map.GroupLayer | |||||||||||
|  From class
  com.esri.android.map.Layer | |||||||||||
|  From class
  java.lang.Object | |||||||||||
The constructor is used if you are instantiating a KMLLayer using a publicly accessible URL. The default output spatial reference is WGS84.
| url | string URL to the KML file. | 
|---|
The constructor is used if you are instantiating a KMLLayer using a URL and output spatial reference.
| url | string URL to the KML file. | 
|---|---|
| outSR | output spatial reference. | 
The constructor is used if you are instantiating a KMLLayer using a URL, output spatial reference and initLayer indicator.
| url | string URL to the KML file. | 
|---|---|
| outSR | output spatial reference. | 
| initLayer | true to initialize the layer. | 
The initialization of a GroupLayer is depended upon if it is empty (return false ) or its first layer being initialized.
Releases resources referenced by the Layer so that they can be recycled.
Refreshes the KML layer by downloading and parsing the KML document.
Sets the visibility of the Layer.
| visible | The visibility to set. | 
|---|
Initializes the layer. The implementation should submit the OnStatusChangedListener.STATUS event accordingly.
The callback method is invoked when the layer is added to map. 0 - Spatial Reference Invalid 1 - Spatial Reference NotNeeded 2 - Spatial Reference Projected 3 - Spatial Reference Good
| SRStatus | an integer indicating the spatial reference status of layer | 
|---|