| Package | com.esri.aws.awx.map.layers.overlays.style |
| Class | public class TriangleMarkerStyle |
| Inheritance | TriangleMarkerStyle BaseOutlineFillStyle BaseMarkerStyle BaseStyle |
| Implements | IStyle |
Note: Although styles have public properties (such as color, fill, alpha) they should not be edited after construction.
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | borderAlpha : Number = 1.0
The alpha of the border line.
| BaseOutlineFillStyle | |
![]() | borderColor : uint = 0xff0000
The color of the border line.
| BaseOutlineFillStyle | |
![]() | borderThickness : Number = 0
The pixel thickness of the border line.
| BaseOutlineFillStyle | |
![]() | fillAlpha : Number = 1.0
The alpha of the fill.
| BaseOutlineFillStyle | |
![]() | fillColor : uint = 0xff0000
The color of the fill.
| BaseOutlineFillStyle | |
| rotation : Number
The rotation of the triangle.
| TriangleMarkerStyle | ||
| width : Number
The width of the triangle.
| TriangleMarkerStyle | ||
| Method | Defined by | ||
|---|---|---|---|
|
TriangleMarkerStyle(width:Number = 10, borderThickness:Number = 0, borderColor:uint = 0xff0000, borderAlpha:Number = 1.0, fillColor:uint = 0xff0000, fillAlpha:Number = 1.0, rotation:Number = 180)
Creates a new TriangleMarkerStyle.
| TriangleMarkerStyle | ||
![]() |
cleanUp(overlayObject:OverlayObject):void
Cleans up the OverlayObject to restore it to its original state.
| BaseStyle | |
![]() |
Creates the default ToolTip (lat/lon) if overlayObject.toolTip is null.
| BaseMarkerStyle | |
| Method | Defined by | ||
|---|---|---|---|
|
Draws the triangle.
| TriangleMarkerStyle | ||
| rotation | property |
rotation:Number [read-write]The rotation of the triangle.
Implementation public function get rotation():Number
public function set rotation(value:Number):void
| width | property |
width:Number [read-write]The width of the triangle.
Implementation public function get width():Number
public function set width(value:Number):void
| TriangleMarkerStyle | () | constructor |
public function TriangleMarkerStyle(width:Number = 10, borderThickness:Number = 0, borderColor:uint = 0xff0000, borderAlpha:Number = 1.0, fillColor:uint = 0xff0000, fillAlpha:Number = 1.0, rotation:Number = 180)Creates a new TriangleMarkerStyle.
Parameterswidth:Number (default = 10) — The width of the triangle.
|
|
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 = 180) — The rotation of the triangle.
|
| drawMarker | () | method |
protected override function drawMarker(overlayObject:OverlayObject, projectionModel:IProjectionModel):voidDraws the triangle.
ParametersoverlayObject:OverlayObject — the overlay object to draw on.
|
|
projectionModel:IProjectionModel — the projection model.
|
<?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="<b>Default circle, square, star, and triangle are all red.</b>" />
<awx:Map id="map" centerGeoY="19" centerGeoX="-159" scale="8000000"/>
</mx:Application>