Packagecom.esri.ags.symbols
Classpublic class PictureFillSymbol
InheritancePictureFillSymbol Inheritance FillSymbol Inheritance Symbol Inheritance flash.events.EventDispatcher

Used to draw polygon features on the graphics layer using an image that gets repeated over and over. The image format can be a PNG, JPG or GIF (but not svg or swf). In addition, the fill symbol can have an optional outline, which is defined by a line symbol.

Note : As of version 2.0, you can also directly pass in a Bitmap or ByteArray as source.

Default MXML Propertyoutline

View the examples

See also

About using JPG, GIF, and PNG with Flex


Public Properties
 PropertyDefined By
  angle : Number
The angle on the image for display.
PictureFillSymbol
  height : Number
Height of the symbol (in pixels).
PictureFillSymbol
 Inheritedoutline : SimpleLineSymbol
The fill outline.
FillSymbol
  source : Object
Source of the image.
PictureFillSymbol
  width : Number
Width of the symbol (in pixels).
PictureFillSymbol
  xoffset : Number
The offset on the x-axis in pixels.
PictureFillSymbol
  xscale : Number
Scale in x direction.
PictureFillSymbol
  yoffset : Number
The offset on the y-axis in pixels.
PictureFillSymbol
  yscale : Number
Scale in y direction.
PictureFillSymbol
Public Methods
 MethodDefined By
  
PictureFillSymbol(source:Object = null, width:Number = 0, height:Number = 0, xscale:Number = 1, yscale:Number = 1, xoffset:Number = 0, yoffset:Number = 0, angle:Number = 0, outline:SimpleLineSymbol = null)
Creates a new PictureFillSymbol.
PictureFillSymbol
 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
Property Detail
angleproperty
angle:Number

The angle on the image for display.


Implementation
    public function get angle():Number
    public function set angle(value:Number):void
heightproperty 
height:Number

Height of the symbol (in pixels). If this symbol height is larger or smaller than the height of the actual image, then the symbol height will shrink or stretch accordingly.


Implementation
    public function get height():Number
    public function set height(value:Number):void
sourceproperty 
source:Object

Source of the image. The default is a blue pushpin.


Implementation
    public function get source():Object
    public function set source(value:Object):void
widthproperty 
width:Number

Width of the symbol (in pixels). If this symbol width is larger or smaller than the width of the actual image, then the symbol width will shrink or stretch accordingly.


Implementation
    public function get width():Number
    public function set width(value:Number):void
xoffsetproperty 
xoffset:Number

The offset on the x-axis in pixels.


Implementation
    public function get xoffset():Number
    public function set xoffset(value:Number):void
xscaleproperty 
xscale:Number

Since : ArcGIS API for Flex 1.3

Scale in x direction.

The default value is 1.0.


Implementation
    public function get xscale():Number
    public function set xscale(value:Number):void
yoffsetproperty 
yoffset:Number

The offset on the y-axis in pixels.


Implementation
    public function get yoffset():Number
    public function set yoffset(value:Number):void
yscaleproperty 
yscale:Number

Since : ArcGIS API for Flex 1.3

Scale in y direction.

The default value is 1.0.


Implementation
    public function get yscale():Number
    public function set yscale(value:Number):void
Constructor Detail
PictureFillSymbol()Constructor
public function PictureFillSymbol(source:Object = null, width:Number = 0, height:Number = 0, xscale:Number = 1, yscale:Number = 1, xoffset:Number = 0, yoffset:Number = 0, angle:Number = 0, outline:SimpleLineSymbol = null)

Creates a new PictureFillSymbol.

Note: in version 1.1 and earlier, the default width and height was 10x10, but as of version 1.2 the default is 0x0.

Note 2: with the introduction of xscale and yscale in version 1.3, the parameters for the constructor was changed.

Note 3: 'xoffset' and 'yoffset' were added to the constructor in version 1.3.

Parameters
source:Object (default = null) — Source of the image (embedded images).
 
width:Number (default = 0) — Width of the image in pixels (default was 10 in version 1.1 and earlier, but is 0 as of version 1.2).
 
height:Number (default = 0) — Height of the image in pixels (default was 10 in version 1.1 and earlier, but is 0 as of version 1.2).
 
xscale:Number (default = 1) — Scale factor in x direction (added to constructor in version 1.3).
 
yscale:Number (default = 1) — Scale factor in y direction (added to constructor in version 1.3).
 
xoffset:Number (default = 0) — The offset on the x-axis in pixels (added to constructor in version 1.3).
 
yoffset:Number (default = 0) — The offset on the y-axis in pixels (added to constructor in version 1.3).
 
angle:Number (default = 0) — The angle on the image for display (added to constructor in version 2.0).
 
outline:SimpleLineSymbol (default = null) — The picture fill outline.
Examples
MXML usage:
 <esri:Graphic toolTip="Brazil">
     <esri:geometry>
         <esri:Polygon spatialReference="{new SpatialReference(102100)}">
             <fx:Array>
                 <fx:Array>
                     <esri:MapPoint x="-3867905" y="-671044"/>
                     <esri:MapPoint x="-4533702" y="-2578326"/>
                     <esri:MapPoint x="-5316417" y="-2832708"/>
                     <esri:MapPoint x="-5844750" y="-3869806"/>
                     <esri:MapPoint x="-6333947" y="-3498016"/>
                     <esri:MapPoint x="-6412218" y="-1942370"/>
                     <esri:MapPoint x="-8211974" y="-954779"/>
                     <esri:MapPoint x="-7703209" y="229077"/>
                     <esri:MapPoint x="-5736637" y="454597"/>
                     <esri:MapPoint x="-3867905" y="-671044"/>
                 </fx:Array>
             </fx:Array>
         </esri:Polygon>
     </esri:geometry>
     <esri:symbol>
         <esri:SimpleFillSymbol alpha="0.7" color="0x009933"/>
     </esri:symbol>
 </esri:Graphic>