Packagecom.esri.ags.symbols
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, symbols of type "circle", "diamond", "square" and "triangle" can have an optional outline, which is defined by a line symbol.

Default MXML Propertyoutline

View the examples

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
Symbol outline for marker symbols of type "circle", "diamond", "square" and "triangle".
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
createSwatch(width:Number = 50, height:Number = 50):UIComponent
Creates a swatch for a symbol which can be used in a legend.
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
 Inherited
initialize(sprite:Sprite, geometry:Geometry, attributes:Object, map:Map):void
Initialize the sprite.
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

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).


Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
colorproperty 
color:uint

Marker symbol color.

The default value is 0x000000 (black).


Implementation
    public function get color():uint
    public function set color(value:uint):void
outlineproperty 
outline:SimpleLineSymbol

Symbol outline for marker symbols of type "circle", "diamond", "square" and "triangle". Does not apply to marker symbols of type "cross" and "x".


Implementation
    public function get outline():SimpleLineSymbol
    public function set outline(value:SimpleLineSymbol):void
sizeproperty 
size:Number

Marker symbol size.

The default value is 15 pixels.


Implementation
    public function get size():Number
    public function set size(value:Number):void
styleproperty 
style:String

Marker symbol style.

The default value is STYLE_CIRCLE.


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 (default = NaN) — 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.

Examples
MXML usage 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
 );