<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:esri="http://www.esri.com/2008/ags" pageTitle="Map Extent and Mouse Coordinates" creationComplete="combobox()"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; private function combobox():void { var comboArray:ArrayCollection = new ArrayCollection(); comboArray = comm_layer.layerInfos.Communities_Places //the specific layer in the map service cmb.dataProvider = comboArray; cmb.labelField = comboArray.comm_name_ //field within the Communities_Places layer } ]]> </fx:Script> <s:layout> <s:VerticalLayout paddingTop="6"/> </s:layout> <s:HGroup> <s:ComboBox id="cmb" right="250"/> </s:HGroup> <esri:Map id="myMap"> <esri:extent> <esri:Extent xmin="-13338986.2116637" ymin="3926661.77417242" xmax="-13002755.460699" ymax="4152028.76378653"> <esri:SpatialReference wkid="3857"/> </esri:Extent> </esri:extent> <esri:ArcGISDynamicMapServiceLayer id="comm_layer" url="http://10.2.8.73/ArcGIS/rest/services/ZNET_Public/city_maskForExtent/MapServer"/> </esri:Map> </s:Application>
Dasa,
I used the code you posted with a point layer. I get weird results with the zoom... does the code work for a point layer or just for a polygon layer?
june
Dasa,
I used the code you posted with a point layer. I get weird results with the zoom... does the code work for a point layer or just for a polygon layer?
june