Package | com.esri.bacore.thematicmapping |
Class | public class TMLayer |
Inheritance | TMLayer com.esri.ags.layers.GraphicsLayer |
Subclasses | ThematicMappingLayer, ThematicMappingLayer |
Default MXML PropertygraphicProvider
Property | Defined By | ||
---|---|---|---|
additionalFields : ArrayCollection [read-only]
Additional fields of the thematic layer requested in every query. | TMLayer | ||
analysisExtent : Geometry
Spatial/geographic extent on which to perform the query. | TMLayer | ||
attributesProvider : TMAttributesProvider [read-only]
Provider of thematic mapping attributes. | TMLayer | ||
autoUpdate : Boolean
The mode of applying updates to thematic layer. | TMLayer | ||
bestLayer : IGeographyLayerInfo [read-only]
Geography layer which is best to show for the current map extent. | TMLayer | ||
borderSymbol : SimpleLineSymbol
The symbol to draw borders around features. | TMLayer | ||
canUpdateVisualState : Boolean [read-only]
Returns true if the visual state of this layer can be modified. | TMLayer | ||
colorRamp : ColorRamp
Color Ramp to thematically shade this layer with. | TMLayer | ||
geographyLayer : IGeographyLayerInfo [read-only]
A geography layer whose features are currently shown in this layer. | TMLayer | ||
geographyLevelAliasName : String [read-only]
Alias name of the geography level whose layer is currently shown in this layer. | TMLayer | ||
geographyLevelName : String
Name of the geography level whose layer is currently shown in this layer. | TMLayer | ||
geographyLevels : GeographyLevels [read-only]
Available geography levels. | TMLayer | ||
geographyLevelsFilter : Function [write-only]
Filter for geography levels available in thematic layer. | TMLayer | ||
intersectAnalysisExtentWithMapExtent : Boolean
Defines how to compose an extent to perform the query when analysis extent is specified. | TMLayer | ||
isReady : Boolean [read-only]
Is true if this layer is ready for show on map. | TMLayer | ||
isUpdating : Boolean [read-only]
Is true if this layer is now updating. | TMLayer | ||
mapExtentDrift : Number
Fraction of linear drift of map extent which is ignored in the auto-update mode. | TMLayer | ||
queryTaskProvider : TMQueryTaskProvider [read-only]
Provider of thematic mapping query task. | TMLayer | ||
showMissingValuesAsZeroes : Boolean
Specifies how to convert missing values of attributes with attributes provider: to zeros (true) or to NaN (false). | TMLayer | ||
spatialRelationship : SpatialRelEnum
The spatial selection method used for selection geography layer features in query task. | TMLayer | ||
symbolizationProvider : TMSymbolizationProvider
Symbolization provider associated with this thematic layer. | TMLayer | ||
tmValueField : String
Name of the calculated field which will contain a value to render the thematic layer by. | TMLayer | ||
valueCalculator : ValueCalculator
Calculator of value to thematically shade this layer by. | TMLayer | ||
where : String
Query WHERE clause. | TMLayer | ||
zIndex : int
The base z-index of features of this layer. | TMLayer |
Method | Defined By | ||
---|---|---|---|
TMLayer()
Creates a new instance of the TMLayer class. | TMLayer | ||
applyUpdates(forceUpdates:Boolean = false):Boolean
Applies updates collected on this layer. | TMLayer | ||
createDescription(graphic:Graphic, descriptionStyle:ValueDescriptionStyle):Object [static]
Creates fields describing value calculation properties for the given graphic feature of a thematic layer. | TMLayer | ||
createDescriptionFields(graphic:Graphic, descriptionStyle:ValueDescriptionStyle):Array [static]
Creates an array of fields describing value calculation properties for the given graphic feature of a thematic layer. | TMLayer | ||
executeQueryTask(layerInfo:IGeographyLayerInfo, query:Query, responder:IResponder):Boolean
Executes a query for the given geography layer. | TMLayer | ||
getLegendInfos(responder:IResponder = null):AsyncToken [override]
Gets legend infos. | TMLayer | ||
initializeQueryTask(responder:IResponder):Boolean
Initializes the query task associated with this layer. | TMLayer | ||
isGeographyLevelAvailable(name:String):Boolean
Tests the geography level to be available for the current map scale. | TMLayer | ||
prepareQuery():Query
Prepares base query parameters. | TMLayer | ||
suspendUpdates():void
Suspends auto updates for this layer. | TMLayer | ||
updateTooltips():Boolean
Immediately updates graphic tooltips if this is possible. | TMLayer | ||
updateVisualState():Boolean
Immediately updates the visual state of this layer if this is possible. | TMLayer |
Method | Defined By | ||
---|---|---|---|
Creates the default symbolization provider to be used together with this thematic layer. | TMLayer |
Event | Summary | Defined By | ||
---|---|---|---|---|
The extentChange event is dispatched when the current map extent is changed. | TMLayer | |||
The fault event is dispatched when an asynchronous execution of query task fails. | TMLayer | |||
The propertyChange event is dispatched when a property of thematic layer is changed. | TMLayer | |||
The taskProgress event is dispatched when a thematic layer update state is changed. | TMLayer | |||
The tmLayerAvailable event is dispatched when the thematic layer availability is changed. | TMLayer | |||
The tmLayerChanged event is dispatched when the thematic layer updates are completed. | TMLayer | |||
The tmRenderer event is dispatched while updating a symbol for rendering a graphic. | TMLayer | |||
The tmValueUpdated event is dispatched when the thematic value of a graphic is updated. | TMLayer |
additionalFields | property |
additionalFields:ArrayCollection
[read-only] Additional fields of the thematic layer requested in every query.
public function get additionalFields():ArrayCollection
analysisExtent | property |
analysisExtent:Geometry
Spatial/geographic extent on which to perform the query. If this extent is missing, the current map extent is used as the analysis extent.
The default value is null
.
This property can be used as the source for data binding.
public function get analysisExtent():Geometry
public function set analysisExtent(value:Geometry):void
attributesProvider | property |
attributesProvider:TMAttributesProvider
[read-only] Provider of thematic mapping attributes. The provider is associated with the current geography layer. If the geography layer is missing, the provider will be null.
public function get attributesProvider():TMAttributesProvider
autoUpdate | property |
autoUpdate:Boolean
The mode of applying updates to thematic layer.
In auto-update mode (autoUpdate is true), any change in layer extent or properties affecting on
layer symbolization and rendering are immediately applied.
In manual-update mode (autoUpdate is false), updates are applied on applyUpdates
call.
To temporary turn off auto-updating in auto-update mode, call the suspendUpdates
method.
Updates will be suspended until the first applyUpdates
call.
The default value is true
.
This property can be used as the source for data binding.
public function get autoUpdate():Boolean
public function set autoUpdate(value:Boolean):void
bestLayer | property |
bestLayer:IGeographyLayerInfo
[read-only] Geography layer which is best to show for the current map extent.
This property value is usually the same as the value of the geographyLayer
property
except the case when the thematic layer is not shown on the map. In this case,
the geographyLayer
property value can be out-of-date and the bestLayer
property value returns an actual layer to be shown when the thematic layer will be
visible.
public function get bestLayer():IGeographyLayerInfo
borderSymbol | property |
borderSymbol:SimpleLineSymbol
The symbol to draw borders around features.
The default value is null
.
This property can be used as the source for data binding.
public function get borderSymbol():SimpleLineSymbol
public function set borderSymbol(value:SimpleLineSymbol):void
canUpdateVisualState | property |
canUpdateVisualState:Boolean
[read-only] Returns true if the visual state of this layer can be modified.
public function get canUpdateVisualState():Boolean
colorRamp | property |
colorRamp:ColorRamp
Color Ramp to thematically shade this layer with.
The default value is an instance of the TMColorRamp type with "yellow to red" gradient
.
This property can be used as the source for data binding.
public function get colorRamp():ColorRamp
public function set colorRamp(value:ColorRamp):void
See also
geographyLayer | property |
geographyLayer:IGeographyLayerInfo
[read-only] A geography layer whose features are currently shown in this layer.
public function get geographyLayer():IGeographyLayerInfo
geographyLevelAliasName | property |
geographyLevelAliasName:String
[read-only] Alias name of the geography level whose layer is currently shown in this layer.
public function get geographyLevelAliasName():String
geographyLevelName | property |
geographyLevelName:String
Name of the geography level whose layer is currently shown in this layer.
public function get geographyLevelName():String
public function set geographyLevelName(value:String):void
geographyLevels | property |
geographyLevels:GeographyLevels
[read-only] Available geography levels. This collection is populated while initialization.
public function get geographyLevels():GeographyLevels
geographyLevelsFilter | property |
geographyLevelsFilter:Function
[write-only] Since : | Community Analyst API for Flex 2.2. |
Filter for geography levels available in thematic layer.
Using this function you can customize a collection of available geography levels when the thematic query task associated with this layer is initialized. The signature of this function is the following:
geographyLevelsFilter(levels:Array):Array
The input parameter contains an array of GeographyLevelInfo items received while initialization the query task. The result array should contain geography levels, which will be associated with the geographyLevels property of the thematic layer.
public function set geographyLevelsFilter(value:Function):void
See also
intersectAnalysisExtentWithMapExtent | property |
intersectAnalysisExtentWithMapExtent:Boolean
Defines how to compose an extent to perform the query when analysis extent is specified.
If this value is false and the analysis extent is specified, this extent is always used to perform query on. If this value is true and the analysis extent is specified, an intersection of the analysis extent envolope with the current map extent is used to perform the query on.
The default value is false
.
This property can be used as the source for data binding.
public function get intersectAnalysisExtentWithMapExtent():Boolean
public function set intersectAnalysisExtentWithMapExtent(value:Boolean):void
isReady | property |
isReady:Boolean
[read-only] Is true if this layer is ready for show on map.
public function get isReady():Boolean
isUpdating | property |
isUpdating:Boolean
[read-only] Since : | Community Analyst API for Flex 2.2. |
Is true if this layer is now updating.
public function get isUpdating():Boolean
mapExtentDrift | property |
mapExtentDrift:Number
Fraction of linear drift of map extent which is ignored in the auto-update mode.
The default value is 0.01
.
public function get mapExtentDrift():Number
public function set mapExtentDrift(value:Number):void
queryTaskProvider | property |
queryTaskProvider:TMQueryTaskProvider
[read-only] Provider of thematic mapping query task.
public function get queryTaskProvider():TMQueryTaskProvider
showMissingValuesAsZeroes | property |
showMissingValuesAsZeroes:Boolean
Specifies how to convert missing values of attributes with attributes provider: to zeros (true) or to NaN (false).
The default value is false
.
public function get showMissingValuesAsZeroes():Boolean
public function set showMissingValuesAsZeroes(value:Boolean):void
spatialRelationship | property |
spatialRelationship:SpatialRelEnum
The spatial selection method used for selection geography layer features in query task.
The default value is SpatialRelEnum.INTERSECTS
.
This property can be used as the source for data binding.
public function get spatialRelationship():SpatialRelEnum
public function set spatialRelationship(value:SpatialRelEnum):void
symbolizationProvider | property |
symbolizationProvider:TMSymbolizationProvider
Symbolization provider associated with this thematic layer.
The default value is an instance returned by the createDefaultSymbolizationProvider method
.
This property can be used as the source for data binding.
public function get symbolizationProvider():TMSymbolizationProvider
public function set symbolizationProvider(value:TMSymbolizationProvider):void
tmValueField | property |
tmValueField:String
Name of the calculated field which will contain a value to render the thematic layer by.
The default value is "$TMValue"
.
public function get tmValueField():String
public function set tmValueField(value:String):void
valueCalculator | property |
valueCalculator:ValueCalculator
Calculator of value to thematically shade this layer by.
The default value is null
.
This property can be used as the source for data binding.
public function get valueCalculator():ValueCalculator
public function set valueCalculator(value:ValueCalculator):void
where | property |
where:String
Query WHERE clause.
The default value is null
.
This property can be used as the source for data binding.
public function get where():String
public function set where(value:String):void
zIndex | property |
zIndex:int
The base z-index of features of this layer.
This property value is assigned as z-index to all graphic features of layer when the features are rendered. If a symbol of feature is updated within "tmRenderer" event, its updating priority is added to the base z-index. Therefore, features with a positive priority will have greater z-index that others and they will be drawn over other graphic features.
If this property value is negative, z-index of graphic features isn't changed while rendering.
The default value is 0
.
This property can be used as the source for data binding.
public function get zIndex():int
public function set zIndex(value:int):void
TMLayer | () | Constructor |
public function TMLayer()
Creates a new instance of the TMLayer class.
applyUpdates | () | method |
public function applyUpdates(forceUpdates:Boolean = false):Boolean
Applies updates collected on this layer.
In auto-update mode, the updates collected from the last suspendUpdates
call are applied.
In manual-update mode, the updates collected from the last applyUpdates
call are applied.
Since Community Analyst API 2.2, the optional forceUpdates
parameter is added.
It allows user to force the full update of the thematic layer by demand.
Parameters
forceUpdates:Boolean (default = false ) — True value means that the full update of the thematic layer will be forced.
|
Boolean — True if some updates are actually applied, false otherwise.
|
createDefaultSymbolizationProvider | () | method |
protected function createDefaultSymbolizationProvider():TMSymbolizationProvider
Creates the default symbolization provider to be used together with this thematic layer.
The default symbolization provider is associated with a thematic layer if a user doesn't associate its own symbolization provider.
ReturnsTMSymbolizationProvider — A new instance of the TMSymbolizationProvider class.
|
createDescription | () | method |
public static function createDescription(graphic:Graphic, descriptionStyle:ValueDescriptionStyle):Object
Creates fields describing value calculation properties for the given graphic feature of a thematic layer.
Parameters
graphic:Graphic — A graphic to create description fields for.
| |
descriptionStyle:ValueDescriptionStyle — Value description style.
|
Object — A new object with description fields.
|
createDescriptionFields | () | method |
public static function createDescriptionFields(graphic:Graphic, descriptionStyle:ValueDescriptionStyle):Array
Creates an array of fields describing value calculation properties for the given graphic feature of a thematic layer.
Parameters
graphic:Graphic — A graphic to create description fields for.
| |
descriptionStyle:ValueDescriptionStyle — Value description style.
|
Array — An array of feature description fields containing KeyValuePair items.
|
See also
executeQueryTask | () | method |
public function executeQueryTask(layerInfo:IGeographyLayerInfo, query:Query, responder:IResponder):Boolean
Executes a query for the given geography layer.
The responder.fault
method receives a parameter of the FaultEvent
type and
responder.result
method receives a parameter of the BATaskCompletedEvent
type
whose result
property contains the result of QueryTaskOutput
type.
Parameters
layerInfo:IGeographyLayerInfo — A geography layer to execute query on.
| |
query:Query — A query to execute.
| |
responder:IResponder — A responder to handle query results.
|
Boolean — True if the executing has started.
|
See also
getLegendInfos | () | method |
override public function getLegendInfos(responder:IResponder = null):AsyncToken
Gets legend infos.
Parameters
responder:IResponder (default = null ) — The responder to call on result or fault. The result function will receive an Array of LayerLegendInfo instances.
|
AsyncToken — The request token.
|
initializeQueryTask | () | method |
public function initializeQueryTask(responder:IResponder):Boolean
Initializes the query task associated with this layer.
The responder.fault
method receives a parameter of the FaultEvent
type and
responder.result
method receives a parameter of the BATaskCompletedEvent
type
whose result
property contains the array of GeographyLevelInfo
items.
If more than one query task is specified for this layer, all of them are initialized
and their result lists are merged into one list which is passed to the responder.result
method.
Since Community Analyst API for Flex 2.2, this method starts initialization every time it is invoked and
always returns the true value. A possibility of customization of the list of available geography levels
is also added with the geographyLevelsFilter
property.
Parameters
responder:IResponder — A responder to handle initialization results.
|
Boolean — True if the initializing has started.
|
See also
isGeographyLevelAvailable | () | method |
public function isGeographyLevelAvailable(name:String):Boolean
Tests the geography level to be available for the current map scale.
Parameters
name:String — Geography level name.
|
Boolean — True if the geography level is available.
|
prepareQuery | () | method |
public function prepareQuery():Query
Prepares base query parameters.
This method populates the spatialRelationship
, geometry
, and
outSpatialReference
parameters of a new query
with currently selected values for this thematic layer.
Query — a new query.
|
suspendUpdates | () | method |
public function suspendUpdates():void
Suspends auto updates for this layer.
updateTooltips | () | method |
public function updateTooltips():Boolean
Immediately updates graphic tooltips if this is possible.
This method ignores the suspend updates mode and tries to immediately update tooltips of graphics. If the visual state of this layer cannot be modified, the request for updating tooltips is ignored.
ReturnsBoolean — True value if the tooltips were immediately updated.
|
updateVisualState | () | method |
public function updateVisualState():Boolean
Immediately updates the visual state of this layer if this is possible.
This method ignores the suspend updates mode and tries to immediately update the renderer of layer. If the visual state of this layer cannot be modified, the request is ignored.
ReturnsBoolean — True value if the renderer was immediately updated.
|
extentChange | Event |
com.esri.ags.events.ExtentEvent
com.esri.ags.events.ExtentEvent.EXTENT_CHANGE
The extentChange
event is dispatched when the current map extent is changed.
fault | Event |
mx.rpc.events.FaultEvent
mx.rpc.events.FaultEvent.FAULT
The fault
event is dispatched when an asynchronous execution of query task fails.
propertyChange | Event |
mx.events.PropertyChangeEvent
mx.events.PropertyChangeEvent.PROPERTY_CHANGE
The propertyChange
event is dispatched when a property of thematic layer is changed.
taskProgress | Event |
com.esri.bacore.thematicmapping.ProgressEvent
com.esri.bacore.thematicmapping.ProgressEvent.PROGRESS
The taskProgress
event is dispatched when a thematic layer update state is changed.
This event is dispatched with following values of the progress
property:
Value | Description |
---|---|
0 | Start update thematic layer. |
25 | Start asynchronous execution of query task. |
50 | Start update render. |
100 | Complete update thematic layer or failed to execute query task. |
type
property of the event object for a taskProgress
event.
The properties of the event object have the following values:
Property | Value |
---|---|
babbles | false |
cancelable | false |
currentTarget | The Object that defines the event listener that handles the event. |
progress | Progress value. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
tmLayerAvailable | Event |
com.esri.bacore.thematicmapping.TMLayerAvailableEvent
com.esri.bacore.thematicmapping.TMLayerAvailableEvent.TYPE
The tmLayerAvailable
event is dispatched when the thematic layer availability is changed.
type
property of the event object for a tmLayerAvailable
event.
The properties of the event object have the following values:
Property | Value |
---|---|
babbles | false |
cancelable | false |
currentTarget | The Object that defines the event listener that handles the event. |
isAvailable | Is layer available for the given scale. |
map | The map associated with the layer. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
tmLayerChanged | Event |
com.esri.bacore.thematicmapping.TMLayerChangedEvent
com.esri.bacore.thematicmapping.TMLayerChangedEvent.CHANGED
The tmLayerChanged
event is dispatched when the thematic layer updates are completed.
type
property of the event object for a tmLayerChanged
event.
The properties of the event object have the following values:
Property | Value |
---|---|
attributesChanged | Whether feature attributes are changed or not. |
babbles | false |
cancelable | false |
classificationChanged | Whether classification of features is changed or not. |
currentTarget | The Object that defines the event listener that handles the event. |
geometryChanged | Whether collection of features is changed or not. |
rendererChanged | Whether coloring of features is changed or not. |
symbolizationChanged | Whether symbolization provider is changed or not. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
tmValueChanged | Whether thematic mapping value is changed or not. |
tmRenderer | Event |
com.esri.bacore.thematicmapping.TMRendererEvent
com.esri.bacore.thematicmapping.TMRendererEvent.RENDERER
The tmRenderer
event is dispatched while updating a symbol for rendering a graphic.
tmValueUpdated | Event |
com.esri.bacore.thematicmapping.TMValueEvent
com.esri.bacore.thematicmapping.TMValueEvent.UPDATED
The tmValueUpdated
event is dispatched when the thematic value of a graphic is updated.
type
property of the event object for a tmValueUpdated
event.
The properties of the event object have the following values:
Property | Value |
---|---|
babbles | false |
cancelable | false |
currentTarget | The Object that defines the event listener that handles the event. |
error | Optional error object which is specified when thematic value calculation fails. |
graphic | Graphic whose thematic value was updated. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
valueState | Thematic value updating state. |