<?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" initialize="application1_initializeHandler(event)" pageTitle="Using the Editor component"> <!-- This sample shows you how to use the editor component. --> <s:layout> <s:VerticalLayout/> </s:layout> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; @namespace esri "http://www.esri.com/2008/ags"; esri|InfoWindow { background-color: #FFFFFF; border-thickness: 2; } </fx:Style> <fx:Script> <![CDATA[ import mx.events.FlexEvent; protected function application1_initializeHandler(event:FlexEvent):void { myEditor.featureLayers = [ incidentsAreas ]; } protected function myToolActivityChange(event:Event):void { myEditor.editTool.deactivate(); incidentsAreas.clearSelection(); myEditor.featureLayers = boxMayToolActive.selected ? null : [ incidentsAreas ]; myEditor.map = boxMayToolActive.selected ? null : myMap; } ]]> </fx:Script> <fx:Declarations> <esri:GeometryService id="myGeometryService" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"/> </fx:Declarations> <s:HGroup width="100%" horizontalAlign="center"> <s:CheckBox label="My Tool is Active" id="boxMayToolActive" selected="false" fontSize="18" change="myToolActivityChange(event)"/> </s:HGroup> <esri:Map id="myMap" wrapAround180="true"> <esri:extent> <esri:Extent id="socal" xmin="-13471000" ymin="3834000" xmax="-12878000" ymax="4124000"> <esri:SpatialReference wkid="102100"/> </esri:Extent> </esri:extent> <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> <esri:FeatureLayer id="incidentsAreas" mode="snapshot" outFields="[data_security,description]" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2"/> </esri:Map> <esri:Editor id="myEditor" width="100%" height="200" geometryService="{myGeometryService}" map="{myMap}"/> </s:Application>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.