Packagecom.esri.ags.symbol
Classpublic class Symbol
InheritanceSymbol Inheritance flash.events.EventDispatcher
SubclassesCompositeSymbol, FillSymbol, InfoSymbol, LineSymbol, MarkerSymbol, TextSymbol

Base class for all symbols. To display points, polylines and polygons on the graphics layer, instead use the following:



Public Methods
 MethodDefined by
  
Creates a new Symbol.
Symbol
  
clear(sprite:Sprite):void
Clears the graphics that were drawn to the sprite object.
Symbol
  
destroy(sprite:Sprite):void
Removes all the graphics that were drawn to the sprite object and resets its properties.
Symbol
  
draw(sprite:Sprite, geometry:Geometry, attributes:Object, map:Map):void
Draw the graphics on the sprite object.
Symbol
Protected Methods
 MethodDefined by
  
Helper function to dispatch a change event.
Symbol
  
removeAllChildren(sprite:Sprite):void
Removes all children from the sprite object.
Symbol
  
toScreenX(map:Map, mapX:Number):Number
Converts the x-coordinate of map point to a screen point.
Symbol
  
toScreenY(map:Map, mapY:Number):Number
Converts the y-coordinate of map point to a screen point.
Symbol
Constructor detail
Symbol()constructor
public function Symbol()

Creates a new Symbol.

Method detail
clear()method
public function clear(sprite:Sprite):void

Clears the graphics that were drawn to the sprite object.

Parameters
sprite:Sprite — The sprite to be cleared.
destroy()method 
public function destroy(sprite:Sprite):void

Removes all the graphics that were drawn to the sprite object and resets its properties.

Parameters
sprite:Sprite — The sprite to be destroyed.
dispatchEventChange()method 
protected function dispatchEventChange():void

Helper function to dispatch a change event. The change event causes the graphic to redraw.

draw()method 
public function draw(sprite:Sprite, geometry:Geometry, attributes:Object, map:Map):void

Draw the graphics on the sprite object.

Parameters
sprite:Sprite — The Sprite object on which the symbol is drawn.
 
geometry:Geometry — The Geometry of the associated graphic.
 
attributes:Object — The Attributes of the associated graphic.
 
map:Map — The Map to set the location of the sprite object.
removeAllChildren()method 
protected function removeAllChildren(sprite:Sprite):void

Removes all children from the sprite object.

Parameters
sprite:Sprite — The sprite object whose children have to be removed.
toScreenX()method 
protected function toScreenX(map:Map, mapX:Number):Number

Converts the x-coordinate of map point to a screen point.

Parameters
map:Map — The Map.
 
mapX:Number — The x-coordinate of the map point to convert.

Returns
Number — The x-coordinate in screen coordinates.
toScreenY()method 
protected function toScreenY(map:Map, mapY:Number):Number

Converts the y-coordinate of map point to a screen point.

Parameters
map:Map — The Map.
 
mapY:Number — The y-coordinate of the map point to convert.

Returns
Number — The y-coordinate in screen coordinates.