Packagecom.esri.ags.symbol
Classpublic class PictureMarkerSymbol
InheritancePictureMarkerSymbol Inheritance MarkerSymbol Inheritance Symbol Inheritance flash.events.EventDispatcher

Used to draw points and multipoints on the graphics layer using an image. The image format can be either JPG, GIF, PNG, SWF or SVG. While SVG images must be embedded within the application, all other image formats can be either embedded within the application or referenced by URL.


Example
MXML usage of PictureMarkerSymbol with embedded image:
 <esri:PictureMarkerSymbol id="pms_embedded" source="@Embed(source='assets/fire.gif')"/>

MXML usage of PictureMarkerSymbol using URL to image:
 <esri:PictureMarkerSymbol
     id="pms_by_url"
     source="http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/assets/blue_1.gif"/>

See also

About using JPG, GIF and PNG with Flex
Live sample - Marker Symbols


Public Properties
 PropertyDefined by
 Inheritedangle : Number
The angle of the marker.
MarkerSymbol
  height : Number
Image height.
PictureMarkerSymbol
  source : Object
Source of the image.
PictureMarkerSymbol
  width : Number
Image width.
PictureMarkerSymbol
 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
  
PictureMarkerSymbol(source:Object = null, width:Number = 0, height:Number = 0, xoffset:Number = 0, yoffset:Number = 0, angle:Number = 0)
Creates a new PictureMarkerSymbol.
PictureMarkerSymbol
 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
heightproperty
height:Number  [read-write]

Image height.

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

Implementation
    public function get height():Number
    public function set height(value:Number):void
sourceproperty 
source:Object  [read-write]

Source of the image.

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

Implementation
    public function get source():Object
    public function set source(value:Object):void
widthproperty 
width:Number  [read-write]

Image width.

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

Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor detail
PictureMarkerSymbol()constructor
public function PictureMarkerSymbol(source:Object = null, width:Number = 0, height:Number = 0, xoffset:Number = 0, yoffset:Number = 0, angle:Number = 0)

Creates a new PictureMarkerSymbol. Note that 'xoffset', 'yoffset' and 'angle' were added to the constructor in version 1.2.

Parameters
source:Object (default = null) — Source of the image.
 
width:Number (default = 0) — Width of the image in pixels.
 
height:Number (default = 0) — Height of the image in pixels.
 
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 image [added to constructor in version 1.2].