<?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" xmlns:esri="http://www.esri.com/2008/ags" initialize="application1_initializeHandler(event)" pageTitle="Editor with all toolbar options" > <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <!--This sample shows you how to use the editor component with a full toolbar.--> <fx:Style> @namespace esri "http://www.esri.com/2008/ags"; esri|InfoWindow { background-color : #FFFFFF; border-thickness : 2; } </fx:Style> <fx:Script> <![CDATA[ import com.esri.ags.components.supportClasses.CreateOptions; import com.esri.ags.events.DrawEvent; import com.esri.ags.tasks.GeometryService; import com.esri.ags.tools.DrawTool; //THIS IS THE DECLARATION THAT IS NOT BEING RECOGNIZED import mx.events.FlexEvent; //THIS IS THE FUNCTION THAT RELIES IN THE EVENT TO CAPTURE THE POINT protected function application1_initializeHandler(event:FlexEvent):void { myEditor.featureLayers = [ points ]; } ]]> </fx:Script> <s:VGroup width="100%" height="100%"> <esri:Map id="myMap" wrapAround180="true"> <esri:extent> <esri:Extent id="sheepfire" xmin="2468000" ymin="371000" xmax="2475000" ymax="376000"> <esri:SpatialReference wkid="32054"/> </esri:Extent> </esri:extent> <esri:ArcGISDynamicMapServiceLayer url="https://maps.ags.ruekert-mielke.com/AGS/rest/services/WaukeshaCity/WaukeshaSignsSampleApp2/MapServer"/> <esri:FeatureLayer id="points" mode="snapshot" outFields="*" url="https://maps.ags.ruekert-mielke.com/AGS/rest/services/WaukeshaCity/WaukeshaSignsSampleSigns/FeatureServer/0"/> </esri:Map> <esri:Editor id="myEditor" width="100%" geometryService="{new GeometryService('https://maps.ags.ruekert-mielke.com/AGS/rest/services/Geometry/GeometryServer')}" map="{myMap}" toolbarCutVisible="true" toolbarMergeVisible="true" toolbarReshapeVisible="true" toolbarVisible="true"/> <s:Label width="100%" text="This feature layer has {points.numGraphics} ({points.selectedFeatures.length} selected) fire areas."/> </s:VGroup> </s:View>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.