<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:framework="com.esri.aws.osgi.framework.*"
xmlns:map="com.esri.aws.awx.map.*"
creationComplete="onCreationComplete()"
layout="absolute"
>
<mx:Script>
<![CDATA[
import flash.geom.Point;
import com.esri.aws.awx.map.layers.overlays.Polygon;
import com.esri.aws.awx.geom.PolygonShape;
private function onCreationComplete() : void
{
var coords : Array = [
new Point( 0, 0),
new Point( -97.06138,32.837),
new Point( 0, 32.832),
new Point( 0, 0)
];
var polygonShape : PolygonShape = new PolygonShape( coords);
var polygon : Polygon = new Polygon( polygonShape);
map.polygonLayer.addOverlay( polygon);
}
]]>
</mx:Script>
<framework:Framework/>
<map:Map id="map"/>
</mx:Application>
Tuesday, September 11, 2007
How to add a polygon to the map ?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment