<esri:FeatureLayer id="incidentsAreas" visible="false" mode="snapshot" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2"/>
private var query:Query = new Query; private var queryTask:QueryTask = new QueryTask(); query.returnGeometry = false; query.outFields = ["objectid"] query.objectIds = null; query.where = "1=1"; queryTask.url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2"; queryTask.executeForIds(query, new AsyncResponder(onExecuteForIdsComplete, queryTask_faultHandler)); private function onExecuteForIdsComplete(objectIds:Array, token:Object = null):void { //Apply a definition expression that removes all the current objectids //Now you should only have the new features you create visible incidentsAreas.definitionExpression = "NOT objectid IN (" + objectIds.join(',') + ")"; } private function queryTask_faultHandler(info:Object, token:Object = null):void { //do nothing }
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.