Packagecom.esri.ags.symbol
Classpublic class SimpleMarkerSymbol
InheritanceSimpleMarkerSymbol Inheritance MarkerSymbol Inheritance Symbol Inheritance flash.events.EventDispatcher

Used to draw points and multipoints (or nodes of polylines and polygons) on the graphics layer using simple markers. SimpleMarkerSymbol is used to display points as a simple shape, for example, a circle. In addition, the symbol can have an optional outline, which is defined by a line symbol.

Default MXML Propertyoutline


Example
MXML usages of SimpleMarkerSymbol:
 <esri:SimpleMarkerSymbol id="smsDefault"/>
 <esri:SimpleMarkerSymbol id="smsBigRedSquare" size="18"
     color="0xFF0000" style="square" alpha="0.7"/>

ActionScript usage of SimpleMarkerSymbol:
 var myPointSymbol:SimpleMarkerSymbol = new SimpleMarkerSymbol(
     SimpleMarkerSymbol.STYLE_CIRCLE, 10, 0xFF0000, 0.5
 );

See also

Live sample - Marker Symbols
Live sample - Change Simple Marker Symbols on-the-fly


Public Properties
 PropertyDefined by
  alpha : Number
Marker symbol alpha (transparency).
SimpleMarkerSymbol
 Inheritedangle : Number
The angle of the marker.
MarkerSymbol
  color : uint
Marker symbol color.
SimpleMarkerSymbol
  outline : SimpleLineSymbol
Marker symbol outline.
SimpleMarkerSymbol
  size : Number
Marker symbol size.
SimpleMarkerSymbol
  style : String
Marker symbol style.
SimpleMarkerSymbol
 Inheritedxoffset : Number
The offset on the x-axis in pixels.
MarkerSymbol
 Inheritedyoffset : Number
The offset on the y-axis in pixels.
MarkerSymbol
Public Methods
 MethodDefined by
  
SimpleMarkerSymbol(style:String, size:Number = 15, color:Number = 0x000000, alpha:Number = 1, xoffset:Number = 0, yoffset:Number = 0, angle:Number = 0, outline:SimpleLineSymbol = null)
Creates a new SimpleMarkerSymbol.
SimpleMarkerSymbol
 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
Public Constants
 ConstantDefined by
  STYLE_CIRCLE : String = "circle"
[static] The marker is a circle.
SimpleMarkerSymbol
  STYLE_CROSS : String = "cross"
[static] The marker is a cross.
SimpleMarkerSymbol
  STYLE_DIAMOND : String = "diamond"
[static] The marker is a diamond.
SimpleMarkerSymbol
  STYLE_SQUARE : String = "square"
[static] The marker is a square.
SimpleMarkerSymbol
  STYLE_TRIANGLE : String = "triangle"
[static] The marker is a triangle.
SimpleMarkerSymbol
  STYLE_X : String = "x"
[static] The marker is a diagonal cross.
SimpleMarkerSymbol
Property detail
alphaproperty
alpha:Number  [read-write]

Marker symbol alpha (transparency). Possible values range from 0.0 (invisible, fully transparent) to 1.0 (opaque, fully visible).

The default value is 1.0 (opaque, fully visible).

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

Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
colorproperty 
color:uint  [read-write]

Marker symbol color.

The default value is 0x000000 (black).

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

Implementation
    public function get color():uint
    public function set color(value:uint):void
outlineproperty 
outline:SimpleLineSymbol  [read-write]

Marker symbol outline.

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

Implementation
    public function get outline():SimpleLineSymbol
    public function set outline(value:SimpleLineSymbol):void
sizeproperty 
size:Number  [read-write]

Marker symbol size.

The default value is 15.

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

Implementation
    public function get size():Number
    public function set size(value:Number):void
styleproperty 
style:String  [read-write]

Marker symbol style.

The default value is STYLE_CIRCLE.

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

Implementation
    public function get style():String
    public function set style(value:String):void
Constructor detail
SimpleMarkerSymbol()constructor
public function SimpleMarkerSymbol(style:String, size:Number = 15, color:Number = 0x000000, alpha:Number = 1, xoffset:Number = 0, yoffset:Number = 0, angle:Number = 0, outline:SimpleLineSymbol = null)

Creates a new SimpleMarkerSymbol. Note that 'xoffset', 'yoffset' and 'angle' were added to the constructor in version 1.2, which changed the placement of the 'outline' parameter.

Parameters
style:String — The marker style.
 
size:Number (default = 15) — The marker size in pixels.
 
color:Number (default = 0x000000) — The marker fill color in RGB.
 
alpha:Number (default = 1) — The transparency value.
 
xoffset:Number (default = 0) — The offset on the x-axis in pixels [added to constructor in version 1.2].
 
yoffset:Number (default = 0) — The offset on the y-axis in pixels [added to constructor in version 1.2].
 
angle:Number (default = 0) — The angle of the marker [added to constructor in version 1.2].
 
outline:SimpleLineSymbol (default = null) — The marker outline.
Constant detail
STYLE_CIRCLEconstant
public static const STYLE_CIRCLE:String = "circle"

The marker is a circle. This is the default style.

STYLE_CROSSconstant 
public static const STYLE_CROSS:String = "cross"

The marker is a cross.

STYLE_DIAMONDconstant 
public static const STYLE_DIAMOND:String = "diamond"

The marker is a diamond.

STYLE_SQUAREconstant 
public static const STYLE_SQUARE:String = "square"

The marker is a square.

STYLE_TRIANGLEconstant 
public static const STYLE_TRIANGLE:String = "triangle"

The marker is a triangle.

STYLE_Xconstant 
public static const STYLE_X:String = "x"

The marker is a diagonal cross.