class Map 方法 toMapFromStage 用于把屏幕坐标转换为地理坐标

public function toMapFromStage(stageX:Number, stageY:Number):MapPoint Converts the global stage coordinates to a map point.
Parameters  stageX:Number — The horizontal coordinate in global stage coordinates.     stageY:Number — The vertical coordinate in global stage coordinates.

Returns  MapPoint — MapPoint in map coordinates.

Example Easily get the geographic location of a mouse click. var
mapPoint:MapPoint = map.toMapFromStage( event.stageX, event.stageY );

Class GraphicUtil纯静态类,提供静态方法getGraphicsExtent getGraphicsExtent () method

public static function getGraphicsExtent(graphics:Array):Extent Returns the extent of all the graphics in the argument array. If the width and height of the resultant extent is 0, null is returned. Parameters  graphics:Array — the array of Graphic objects.

Returns  Extent — the unioned extent of all the input graphics.

Class ArcGISDynamicMapServiceLayer 属性 layerDefinitions可以用于条件过滤 layerDefinitions:Array  [read-write] Array of layer definition expressions that allows you to filter the features of individual layers in the exported map image. Definition expressions for layers that are currently not visible will be ignored by the server.
过滤的对象是数组类型的字符串String <esri:ArcGISDynamicMapServiceLayer id="dyn"         url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer">         <esri:layerDefinitions>             <!-- Layers in the order 0..x of the map service -->             <mx:Array>                  <mx:String></mx:String> <!-- Census block points表示图层1 -->                  <mx:String></mx:String> <!-- Census block groups    图层2 -->                  <mx:String></mx:String>  <!-- Counties              图层3 -->                  <mx:String><![CDATA[ AGE_UNDER5 + AGE_5_17 > AGE_50_64 + AGE_65_UP ]]></mx:String>  <!-- Coarse Counties图层4 -->                  <mx:String><![CDATA[ AGE_UNDER5 + AGE_5_17 > AGE_50_64 + AGE_65_UP ]]></mx:String>  <!-- Detailed Counties图层5 -->                  <mx:String><![CDATA[ AGE_UNDER5 + AGE_5_17 > AGE_50_64 + AGE_65_UP ]]></mx:String>  <!-- States图层6 -->              </mx:Array>         </esri:layerDefinitions> </esri:ArcGISDynamicMapServiceLayer> 子图层有6个,图层1.2.3不设置过滤条件 4.5.6设置过滤条件为 AGE_UNDER5 + AGE_5_17 > AGE_50_64 + AGE_65_UP 过滤得到的要素以默认的区域显示

<esri:Map id="map" units="{Units.FEET}"> 给Map对象设置units属性,可以把不同坐标系的地图叠合在一起

分类渲染  <esri:GraphicsLayer id="graphicsLayer">             <esri:renderer>                 <esri:ClassBreaksRenderer attribute="ranking">                     <esri:ClassBreakInfo maxValue="0.33" symbol="{smallSym}"/>                     <esri:ClassBreakInfo minValue="0.33" maxValue="0.67" symbol="{mediumSym}"/>                     <esri:ClassBreakInfo minValue="0.67" symbol="{largeSym}"/>                 </esri:ClassBreaksRenderer>             </esri:renderer>  </esri:GraphicsLayer>

var attributes:Object = { "ranking": Math.random() };

attributes : Object(Graphic类的attribute属性) Name-value pairs of fields and field values associated with the graphic

Graphic构造函数 public function Graphic(geometry:Geometry = null, symbol:Symbol = null, attributes:Object = null)

分类渲染ClassBreakRenderer A class break renderer symbolizes each graphic based on the value of some numeric attribute. 可以看出分类渲染的值范围是根据Object类的value来进行分类的,即上面Graphic类的attributes属性

05-26 19:21