Version: Flash Builder 4 && arcgis API for Flex 2.5
<?xml version= "1.0" encoding= "Utf-8"?> <s:application xmlns:fx= "http://ns.adobe.com/mxml/2009" xmlns:s= "Li Brary://ns.adobe.com/flex/spark "xmlns:esri=" Http://www.esri.com/2008/ags "xmlns:mx=" library://ns.adobe.com/f Lex/mx "minwidth=" 955 "minheight=" > <fx:Declarations> <!--Create a spatial reference of 4326 for GPs coordinate reference----<esri:spat
Ialreference id= "sr" wkid= "4326"/> <!--Create control bar--<esri:navigationtool id= "Navtoolbar" map= "{myMap}"/> <!--create Drawing toolbar drawtoolbar--> <esri:drawtool id= "Drawtoolbar" map= "{myMap}" graphicslayer= "{Mygraphicslayer}" /> </fx:Declarations> <esri:map crosshairvisible= "true" id= "MyMap" > <esri:extent> < ; esri:extent id = "Esrimapextent" xmin= "ymin=" 39.5 "xmax=" 116.5 "ymax=" 40.5 "/> </esri:extent> < ; Esri:arcgistiledmapservicelayer url= "Http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_ 2d/mapserver "/> <esri:Graphicslayer id= "Mygraphicslayer" spatialreference= "{sr}"/> </esri:Map> <mx:controlbar horizontalgap= " 0 "paddingbottom=" 0 "paddingtop=" 0 "label=" Map control bar "> <mx:button label=" Zoom in "click=" Navtoolbar.activate (
navigationtool.zoom_in) "/> <mx:button label=" Zoom Out "click=" Navtoolbar.activate (navigationtool.zoom_out) "/> <mx:button label= "roaming" click= "navtoolbar.activate (navigationtool.pan)"/> <mx:button label= "ancestor window" click= " Navtoolbar.zoomtoprevextent () "enabled=" {!navtoolbar.isfirstextent} "/> <mx:button label=" downlevel window "click=" Navtoolbar.zoomtonextextent () "enabled=" {!navtoolbar.islastextent} "/> <mx:button label=" reset "click=" NavToolbar.map.zoomToInitialExtent () "/> </mx:ControlBar> <mx:controlbar horizontalgap=" 0 " paddingbottom= "0" paddingtop= "label=" Drawing toolbar > <mx:button label= "point" click= "Drawtoolbar.activate ( Drawtool.mappoint) "/> <mx:button label=" line "click=" Drawtoolbar.activate (drawtool.polyline) "/> <Mx:button label= "Streamline" click= "Drawtoolbar.activate (drawtool.freehand_polyline)"/> <mx:button label= "painted Face" click= " Drawtoolbar.activate (Drawtool.polygon) "/> <mx:button label=" Flow surface "click=" drawtoolbar.activate ( Drawtool.freehand_polygon) "/> <mx:button label=" End Drawing "click=" drawtoolbar.deactivate () "/> </mx: Controlbar> </s:Application>