<?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="application_initializeHandler(event)" pageTitle="Editor component with toolbar"> <!-- <s:layout> <s:VerticalLayout gap="0"/> </s:layout> <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.tasks.GeometryService; import mx.events.FlexEvent; protected function application_initializeHandler(event:FlexEvent):void { myEditor.featureLayers = [ points ]; } protected function getFeatureCount(value:Array):int { return value.length; } ]]> </fx:Script> <s:BorderContainer width="100%" backgroundColor="#D7D7D7"> <s:layout> <s:VerticalLayout paddingBottom="7" paddingLeft="10" paddingRight="10" paddingTop="7"/> </s:layout> <s:RichText width="100%"> This sample demonstrates how to use the editor component with a toolbar. By default, the "toolbar" displays below the template picker, but you can change this with the skin parts. </s:RichText> <s:Label width="100%" paddingLeft="3" text="Two feature layers with {points.numGraphics} ({getFeatureCount(points.selectedFeatures)}) points (showing selected feature count in parenthesis)."/> </s:BorderContainer> <s:HGroup width="100%" height="100%" paddingLeft="5" paddingTop="5"> <esri:Map id="myMap" wrapAround180="true"> <esri:extent> <esri:Extent id="sheepfire" xmin="-1.09742216352E7" ymin="3006114.7661000006" xmax="-1.08446320657E7" ymax="3100223.793400001"> <esri:SpatialReference wkid="102100"/> </esri:Extent> </esri:extent> <esri:ArcGISTiledMapServiceLayer url="http://gis.lrgvdc911.org:8399/arcgis/rest/services/BaseMap/MapServer/"/> <esri:FeatureLayer id="points" mode="onDemand" outFields="[StateID, FirstName, LastName]" url="http://gissvr:6080/arcgis/rest/services/STEARWEBMAPTEST/MapServer/0"/> <esri:infoWindowContent> <esri:AttributeInspector id="attrInsp"> <esri:FieldInspector featureLayer="{points}" fieldName="activeprod"/> <esri:FieldInspector featureLayer="{points}" fieldName="StateID"/> <esri:FieldInspector featureLayer="{points}" fieldName="FirstName"/> <esri:FieldInspector featureLayer="{points}" fieldName="LastName"> </esri:FieldInspector> <esri:Editor id="myEditor" width="266" geometryService="{new GeometryService('http://gissvr:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer')}" map="{myMap}" toolbarVisible="true"> </esri:Editor> </esri:AttributeInspector> </esri:infoWindowContent> </esri:Map>
http://gissvr:6080/arcgis/rest/services/STEARWEBMAPTEST/MapServer/0
http://gissvr:6080/arcgis/rest/services/STEARWEBMAPTEST/FeatureServer/0
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.