public class

KMLLayer

extends GroupLayer
java.lang.Object
   ↳ com.esri.android.map.Layer
     ↳ com.esri.android.map.GroupLayer
       ↳ com.esri.android.map.ogc.KMLLayer

This class is deprecated.
since 10.2.4 use KmlLayer

Class Overview

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.

Summary

[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

Public Constructors

public KMLLayer (String url)

The constructor is used if you are instantiating a KMLLayer using a publicly accessible URL. The default output spatial reference is WGS84.

Parameters
url String: string URL to the KML file.

public KMLLayer (String url, SpatialReference outSR)

The constructor is used if you are instantiating a KMLLayer using a URL and output spatial reference.

Parameters
url String: string URL to the KML file.
outSR SpatialReference: output spatial reference.

public 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.

Parameters
url String: string URL to the KML file.
outSR SpatialReference: output spatial reference.
initLayer boolean: true to initialize the layer.

Public Methods

public boolean isInitialized ()

The initialization of a GroupLayer is depended upon if it is empty (return false ) or its first layer being initialized.

Returns
boolean boolean

public void recycle ()

Releases resources referenced by the Layer so that they can be recycled.

public void refresh ()

Refreshes the KML layer by downloading and parsing the KML document.

public void setVisible (boolean visible)

Sets the visibility of the Layer.

Parameters
visible boolean: The visibility to set.

Protected Methods

protected void initLayer ()

Initializes the layer. The implementation should submit the OnStatusChangedListener.STATUS event accordingly.

protected void updateSpatialReferenceStatus (int SRStatus)

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, -1 -layer loading failed (security etc. reasons).

Parameters
SRStatus int: an integer indicating the spatial reference status of layer