Packagecom.esri.aws.awx.map.layers.overlays.style
Classpublic class SquareMarkerStyle
InheritanceSquareMarkerStyle Inheritance BaseOutlineFillStyle Inheritance BaseMarkerStyle Inheritance BaseStyle
ImplementsIStyle

A simple square marker style that has a border and a fill.

Note: Although styles have public properties (such as color, fill, alpha) they should not be edited after construction.

View the examples.

See also

Live Sample - Explore Markers - Flex API


Public Properties
 PropertyDefined by
 InheritedborderAlpha : Number = 1.0
The alpha of the border line.
BaseOutlineFillStyle
 InheritedborderColor : uint = 0xff0000
The color of the border line.
BaseOutlineFillStyle
 InheritedborderThickness : Number = 0
The pixel thickness of the border line.
BaseOutlineFillStyle
 InheritedfillAlpha : Number = 1.0
The alpha of the fill.
BaseOutlineFillStyle
 InheritedfillColor : uint = 0xff0000
The color of the fill.
BaseOutlineFillStyle
  rotation : Number
The rotation of the square.
SquareMarkerStyle
  width : Number
The width of the square.
SquareMarkerStyle
Public Methods
 MethodDefined by
  
SquareMarkerStyle(width:Number = 5, borderThickness:Number = 0, borderColor:uint = 0xff0000, borderAlpha:Number = 1.0, fillColor:uint = 0xff0000, fillAlpha:Number = 1.0, rotation:Number = 0)
Creates a new SquareMarkerStyle.
SquareMarkerStyle
 Inherited
cleanUp(overlayObject:OverlayObject):void
Cleans up the OverlayObject to restore it to its original state.
BaseStyle
 Inherited
draw(overlayObject:OverlayObject, projectionModel:IProjectionModel):void
Creates the default ToolTip (lat/lon) if overlayObject.toolTip is null.
BaseMarkerStyle
Protected Methods
 MethodDefined by
  
drawMarker(overlayObject:OverlayObject, projectionModel:IProjectionModel):void
Draws the square.
SquareMarkerStyle
Property detail
rotationproperty
rotation:Number  [read-write]

The rotation of the square.

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

The width of the square.

Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor detail
SquareMarkerStyle()constructor
public function SquareMarkerStyle(width:Number = 5, borderThickness:Number = 0, borderColor:uint = 0xff0000, borderAlpha:Number = 1.0, fillColor:uint = 0xff0000, fillAlpha:Number = 1.0, rotation:Number = 0)

Creates a new SquareMarkerStyle.

Parameters
width:Number (default = 5) — The width of the square.
 
borderThickness:Number (default = 0) — The pixel thickness of the border line.
 
borderColor:uint (default = 0xff0000) — The color of the border line.
 
borderAlpha:Number (default = 1.0) — The alpha of the border line.
 
fillColor:uint (default = 0xff0000) — The color of the fill.
 
fillAlpha:Number (default = 1.0) — The alpha of the fill.
 
rotation:Number (default = 0) — The rotation of the square.
Method detail
drawMarker()method
protected override function drawMarker(overlayObject:OverlayObject, projectionModel:IProjectionModel):void

Draws the square.

Parameters
overlayObject:OverlayObject — the overlay object to draw on.
 
projectionModel:IProjectionModel — the projection model.
Examples
Several_MarkerStyle_Examples
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:awx="http://www.arcwebservices.com/2007/awx"
    creationComplete="onCreationComplete()"
    styleName="plain">
    <mx:Script>
        <![CDATA[
            // markers
            import com.esri.aws.awx.geom.MarkerShape;
            import com.esri.aws.awx.map.layers.overlays.Marker;
            // specific marker styles
            import com.esri.aws.awx.map.layers.overlays.style.CircleMarkerStyle;
            import com.esri.aws.awx.map.layers.overlays.style.ImageMarkerStyle;
            import com.esri.aws.awx.map.layers.overlays.style.SquareMarkerStyle;
            import com.esri.aws.awx.map.layers.overlays.style.StarMarkerStyle;
            import com.esri.aws.awx.map.layers.overlays.style.TriangleMarkerStyle;
            // Note 'markerLayer' is one of three default OverlayLayers that are part of the default map

            private function onCreationComplete():void
            {
                // default CircleMarkerStyle is a red circle
                map.markerLayer.addOverlay(new Marker(new MarkerShape(21,-160),new CircleMarkerStyle()));
                map.markerLayer.addOverlay(new Marker(new MarkerShape(21,-159),new CircleMarkerStyle(10,1,0x0000ff,1,0xffffff,0.2)));

                // default SquareMarkerStyle is a red square
                map.markerLayer.addOverlay(new Marker(new MarkerShape(20,-160),new SquareMarkerStyle()));
                map.markerLayer.addOverlay(new Marker(new MarkerShape(20,-159),new SquareMarkerStyle(20,2,0x000000,1,0xffff00,0.2,45)));

                // default StarMarkerStyle is a red star
                map.markerLayer.addOverlay(new Marker(new MarkerShape(19,-160), new StarMarkerStyle()));
                map.markerLayer.addOverlay(new Marker(new MarkerShape(19,-159), new StarMarkerStyle(6,10,20,2,0xFF0000,1,0xffff00,0.3,45)));

                // default TriangleMarkerStyle is a red triangle
                map.markerLayer.addOverlay(new Marker(new MarkerShape(18,-160),new TriangleMarkerStyle()));
                map.markerLayer.addOverlay(new Marker(new MarkerShape(18,-159),new TriangleMarkerStyle(30,2,0x00ff00,1,0x0000ff,0.2,0)));

                // default ImageMarkerStyle is a black "i"
                map.markerLayer.addOverlay(new Marker(new MarkerShape(17,-160),new ImageMarkerStyle()));
                // the sandcastle.gif is 25x25 so we center it with 12x12
                map.markerLayer.addOverlay(new Marker(new MarkerShape(17,-159),new ImageMarkerStyle("http://www.geographynetwork.com/out/mapicons/raster/sandcastle.gif", 12,12)));
            }
        ]]>
    </mx:Script>

    <awx:Framework apiKey="[YOUR AWX API KEY]"/>
    <mx:Text color="0xFF0000" htmlText="&lt;b&gt;Default circle, square, star, and triangle are all red.&lt;/b&gt;" />
    <awx:Map id="map" centerGeoY="19" centerGeoX="-159" scale="8000000"/>
</mx:Application>