Packagecom.esri.ags.symbol
Classpublic class CompositeSymbol
InheritanceCompositeSymbol Inheritance Symbol Inheritance flash.events.EventDispatcher

Used to draw multiple symbols on a single graphic. The symbols can be a combination of point, line and fill symbols. For example, on polyline and polygon features a SimpleMarkerSymbol can be used for each node. Uses the ArrayCollection of the symbol objects to draw the respective symbols.

Note: as of version 1.1, you can create empty composite symbols.

Default MXML Propertysymbols


Example
MXML usage of CompositeSymbol:
 <esri:CompositeSymbol>
     <esri:SimpleMarkerSymbol style="circle" color="0x000000" size="20"/>
     <esri:SimpleMarkerSymbol style="triangle" color="0xFFFF00" size="20"/>
     <esri:SimpleMarkerSymbol style="triangle" color="0xFFFF00" size="20" angle="180"/>
 </esri:CompositeSymbol>

MXML usage of CompositeSymbol:
 <esri:CompositeSymbol>
     <esri:SimpleLineSymbol style="solid" alpha="1" color="0x0008F13"/>
     <esri:SimpleMarkerSymbol style="square" size="8" color="0x0008F13"/>
 </esri:CompositeSymbol>

See also

Live sample - Marker Symbols (including composite symbols)
Live sample - Line Symbols (including composite symbols)
Live sample - Fill Symbols (including composite symbols)


Public Properties
 PropertyDefined by
  symbols : Object
Used to draw multiple symbols on point, line or polygon features in a GraphicsLayer.
CompositeSymbol
Public Methods
 MethodDefined by
  
CompositeSymbol(symbols:Object = null)
Creates a new CompositeSymbol.
CompositeSymbol
 Inherited
clear(sprite:Sprite):void
Clears the graphics that were drawn to the sprite object.
Symbol
 Inherited
destroy(sprite:Sprite):void
Removes all the graphics that were drawn to the sprite object and resets its properties.
Symbol
 Inherited
draw(sprite:Sprite, geometry:Geometry, attributes:Object, map:Map):void
Draw the graphics on the sprite object.
Symbol
Protected Methods
 MethodDefined by
 Inherited
Helper function to dispatch a change event.
Symbol
 Inherited
removeAllChildren(sprite:Sprite):void
Removes all children from the sprite object.
Symbol
 Inherited
toScreenX(map:Map, mapX:Number):Number
Converts the x-coordinate of map point to a screen point.
Symbol
 Inherited
toScreenY(map:Map, mapY:Number):Number
Converts the y-coordinate of map point to a screen point.
Symbol
Property detail
symbolsproperty
symbols:Object  [read-write]

Used to draw multiple symbols on point, line or polygon features in a GraphicsLayer. This property lets you use either an Array, an ArrayCollection, or a single Symbol. If you set the symbols property to an Array, it will be converted to an ArrayCollection. If you set the property to an ArrayCollection, it will be used directly. If you set the property to a single Symbol, it will be wrapped in a new ArrayCollection.

The default value is an empty ArrayCollection.

This property can be used as the source for data binding.

Implementation
    public function get symbols():Object
    public function set symbols(value:Object):void

See also

Constructor detail
CompositeSymbol()constructor
public function CompositeSymbol(symbols:Object = null)

Creates a new CompositeSymbol.

Parameters
symbols:Object (default = null) — The symbols that make up the composite symbol.