| Package | com.esri.ags.layers |
| Class | public class KMLLayer |
| Inheritance | KMLLayer Layer mx.core.UIComponent |
| Implements | ILegendSupport |
Support for HTML in the description is limited to what Flash platform supports: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#htmlText.
See also
| Property | Defined By | ||
|---|---|---|---|
| description : String
Description as defined by the kml file. | KMLLayer | ||
| disableClientCaching : Boolean
If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from
being loaded from the browser's cache. | KMLLayer | ||
| featureInfos : Array [read-only]
An array of objects that describe top-level KML features ids and their types. | KMLLayer | ||
| folders : Array [read-only]
An array of KMLFolder objects that describe the folders and nested folders defined in the KML file. | KMLLayer | ||
| groundOverlays : Array [read-only]
Array of KMLGroundOverlay instances. | KMLLayer | ||
| initialExtent : Extent [override] [read-only]
Initial extent as defined by the map service. | KMLLayer | ||
![]() | isInScaleRange : Boolean [read-only]
Returns true if the current scale of the map is between the maximum and minimum scale of the layer [added in version 1.3]. | Layer | |
| layers : Array [read-only]
Array of map layers that the KML layer creates to draw placemarks and ground overlays. | KMLLayer | ||
![]() | loaded : Boolean [read-only]
When the layer is loaded, the value becomes "true" and layer properties can be accessed. | Layer | |
![]() | loadFault : Fault [read-only]
A reference to the fault that is dispatched when the layer throws a loadError event. | Layer | |
![]() | map : Map [read-only]
A reference to the Map this layer is in. | Layer | |
![]() | maxScale : Number
The maximum scale of the layer [added in version 1.3]. | Layer | |
![]() | minScale : Number
The minimum scale of the layer [added in version 1.3]. | Layer | |
| networkLinks : Array [read-only]
Array of KMLLayer instances. | KMLLayer | ||
| requestTimeout : int
The request timeout in seconds. | KMLLayer | ||
| respectFeatureVisibility : Boolean
If true, respects the visibility of each feature within a folder. | KMLLayer | ||
| screenOverlays : Array [read-only]
Array of KMLScreenOverlay instances. | KMLLayer | ||
| serviceURL : String
URL to utility service for converting KML files to features. | KMLLayer | ||
| snippet : String
Snippet
| KMLLayer | ||
![]() | spatialReference : SpatialReference [read-only]
The spatial reference of the layer. | Layer | |
![]() | units : String [read-only]
The units of the layer. | Layer | |
| url : String
The url for a .kml or .kmz file. | KMLLayer | ||
| Method | Defined By | ||
|---|---|---|---|
KMLLayer(url:String = null)
Creates a new KMLLayer based on a publicly accessible URL. | KMLLayer | ||
getFeature(featureInfo:KMLFeatureInfo):Object
Returns the KML feature identified by the given feature info. | KMLLayer | ||
getLegendInfos(responder:IResponder = null):AsyncToken
Gets legend infos. | KMLLayer | ||
![]() | refresh():void
Causes the layer to redraw or reload its content. | Layer | |
setFolderVisibility(folder:KMLFolder, isVisible:Boolean):void
Sets the visibility of the given folder. | KMLLayer | ||
| description | property |
description:StringDescription as defined by the kml file.
This property can be used as the source for data binding.
public function get description():String public function set description(value:String):void| disableClientCaching | property |
disableClientCaching:BooleanIf true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from being loaded from the browser's cache.
The default value is false.
This property can be used as the source for data binding.
public function get disableClientCaching():Boolean public function set disableClientCaching(value:Boolean):void| featureInfos | property |
featureInfos:Array [read-only] An array of objects that describe top-level KML features ids and their types.
This property can be used as the source for data binding.
public function get featureInfos():ArraySee also
| folders | property |
folders:Array [read-only]
An array of KMLFolder objects that describe the folders and nested folders defined in the KML file.
Use the parentFolderId and subFolderIds to identify the hierarchical relationship between folders.
This property can be used as the source for data binding.
public function get folders():ArraySee also
| groundOverlays | property |
groundOverlays:Array [read-only]
Array of KMLGroundOverlay instances.
This property can be used as the source for data binding.
public function get groundOverlays():ArraySee also
| initialExtent | property |
initialExtent:Extent [read-only] [override] Initial extent as defined by the map service. Used by the map if it is the first layer in the map and map doesn't have an extent specified.
This property can be used as the source for data binding.
public function get initialExtent():Extent| layers | property |
layers:Array [read-only]
Array of map layers that the KML layer creates to draw placemarks and ground overlays.
The array contains instances of the following layer types: FeatureLayer and MapImageLayer.
This property can be used as the source for data binding.
public function get layers():ArraySee also
| networkLinks | property |
networkLinks:Array [read-only]
Array of KMLLayer instances.
This property can be used as the source for data binding.
public function get networkLinks():Array| requestTimeout | property |
requestTimeout:intThe request timeout in seconds. A value less than or equal to zero prevents request timeout.
The default value is -1.
This property can be used as the source for data binding.
public function get requestTimeout():int public function set requestTimeout(value:int):void| respectFeatureVisibility | property |
respectFeatureVisibility:BooleanIf true, respects the visibility of each feature within a folder.
The default value is false.
This property can be used as the source for data binding.
public function get respectFeatureVisibility():Boolean public function set respectFeatureVisibility(value:Boolean):void| screenOverlays | property |
screenOverlays:Array [read-only]
Array of KMLScreenOverlay instances.
This property can be used as the source for data binding.
public function get screenOverlays():ArraySee also
| serviceURL | property |
serviceURL:StringURL to utility service for converting KML files to features.
The default value is http://utility.arcgis.com/sharing/kml.
This property can be used as the source for data binding.
public function get serviceURL():String public function set serviceURL(value:String):void| snippet | property |
snippet:StringSnippet
This property can be used as the source for data binding.
public function get snippet():String public function set snippet(value:String):void| url | property |
url:StringThe url for a .kml or .kmz file.
This property can be used as the source for data binding.
public function get url():String public function set url(value:String):void| KMLLayer | () | Constructor |
public function KMLLayer(url:String = null)Creates a new KMLLayer based on a publicly accessible URL.
Parametersurl:String (default = null) |
| getFeature | () | method |
public function getFeature(featureInfo:KMLFeatureInfo):ObjectReturns the KML feature identified by the given feature info.
Parameters
featureInfo:KMLFeatureInfo |
Object |
| getLegendInfos | () | method |
public function getLegendInfos(responder:IResponder = null):AsyncTokenGets legend infos.
Parameters
responder:IResponder (default = null) — The responder to call on result or fault.
The result function will be given an Array of LayerLegendInfo instances.
|
AsyncToken —
|
See also
| setFolderVisibility | () | method |
public function setFolderVisibility(folder:KMLFolder, isVisible:Boolean):voidSets the visibility of the given folder. All kml features within that folder will be affected.
Parameters
folder:KMLFolder | |
isVisible:Boolean |