RemoveOverlapTask help.

3790
8
Jump to solution
03-26-2012 03:28 PM
SeanCook
New Contributor
I have been trying to get the remove overlap task working for the past few days, and have not had any luck. I was wondering if anyone has gotten this working or has an example? I have been trying both as a widget and adapting the ESRI example:

http://baserver.esri.com/BAS_Flex/SamplesExplorer.html?sample=RemoveOverlap

It seems to return a feature set, but I cannot for the life of me get it to display any of the featureset.features on a graphics layer. Verr strange.
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Hi Scott,

I started with this sample code from the BA Server Remove Overlap example:

http://baserver.esri.com/BAS_Flex/SamplesExplorer.html?sample=RemoveOverlap

I am using Flex 4.5.1 with the ArcGIS API for Flex v2.4 and the Business Analyst API for Flex 2.2.  Here is a screenshot of the SWC???s in my Project -> Properties -> Flex Build Path -> Library Path tab:

[ATTACH=CONFIG]13517[/ATTACH]

After copying and pasting the sample mxml code from (1) into a new MXML application and properly referencing the libraries in (2), I made the following code changes:

a. I updated the namespaces (this may vary based on the libraries you reference):

[ATTACH=CONFIG]13518[/ATTACH]


b. I commented out the sample viewer-specific import statements and added the BAServerClient namespace:

[ATTACH=CONFIG]13519[/ATTACH]

c. Finally, in the executeTask() function, I commented out the Sample Viewer-specific BAClient instance and replaced it with a BAServerClient instance while assigning its URL property the service endpoint for our demo server instance (which contains a partial/sample dataset and does not have other security features enabled for demo purposes)  Note that your server instance endpoint may differ based on your configuration, security settings, and map service name: http://{host}:{port}/ArcGIS/baserver/REST/services/{service}/BAServer:

[ATTACH=CONFIG]13520[/ATTACH]

After, making the modifications, I ran the task in Flex Builder and it worked fine.

The next post will be the MXML.

Chris

View solution in original post

0 Kudos
8 Replies
by Anonymous User
Not applicable
Hi Sean,

Can you provide me with a code snippet demonstrating how you are trying to get to the features?

Chris
0 Kudos
SeanCook
New Contributor
Ok, so right now I am trying to get the service working by adapting the example application here:

http://baserver.esri.com/BAS_Flex/SamplesExplorer.html?sample=RemoveOverlap

The only code I have changed is adding my client, removing the "attribute" call for the fill symbols which was apparently retired,  and the resultHandler function, which IS being triggered by the task.

I feel like my resultHandler task should be putting something on screen. The label does display "taskResultOutput" (line 285). If I don't comment out the lines which make the map extent equal to the result output(281-282), the program hangs.

I have taken out the imports and variable declarations to make the post fit. They are identical to the sample above.

<?xml version="1.0" encoding="utf-8"?>
<s:Application 
 xmlns:esri="http://www.esri.com/2008/ags"
 xmlns:fx="http://ns.adobe.com/mxml/2009" 
 xmlns:s="library://ns.adobe.com/flex/spark" 
 xmlns:mx="library://ns.adobe.com/flex/mx" 
 pageTitle="Example - Using Esri Business Analyst Server API for Flex to execute a Remove Overlap task."
 creationComplete="startSample()">
 <!--
 This sample takes user-drawn trade areas and executes the Remove Overlap task
 to remove the overlap (cannibalization) between trade areas.
 
 <fx:Script>
  <![CDATA[
   //----------------------------------
   // Initializing
   //----------------------------------
   
   /**
    * Initialize the polygon draw at sample creating
    */
   private function startSample():void 
   {
    _initialExtent = map.extent;
    
    lblGuide.text = "This sample demonstrates setting up multiple trade or service areas " +
     "and removing any overlaps between them. To begin, draw a polygon area " +
     "to represent the first of two sample trade area polygons.";
    
    drawToolbar.activate(DrawTool.POLYGON);
   }
   
   //----------------------------------
   // Drawing
   //----------------------------------
   
   /**
    * Event handler for draw completing event;
    * capture the graphics from draw tollbar, 
    * add the graphics to Map and create an object
    * based on graphic drawn. 
    */
   private function onDrawEnd(event:DrawEvent):void  
   {                
    var graphic:Graphic = event.graphic;  
    graphic.autoMoveToTop = false;
    
    
    map.extent = _initialExtent;
    
    
    
    tradeAreasLayer.add(graphic);             
    
    // Capture the polygon geometry from the draw toolbar.
    if (event.graphic.geometry is Polygon) {
     if (!_drawSecond) {
      _tradeArea1 = Polygon(event.graphic.geometry);
      _tradeArea1.spatialReference = map.extent.spatialReference;
      
      _drawSecond = true;
      drawToolbar.deactivate();
      drawToolbar.fillSymbol = sfs2;
      drawToolbar.lineSymbol = sls2;
      drawToolbar.activate(DrawTool.POLYGON);
      lblGuide.text = "Now draw your second and last sample trade area polygon. " +
       "In order to best view the results, " +
       "be sure that your second area overlaps the first.";
     }
     else {
      _tradeArea2 = Polygon(event.graphic.geometry);
      _tradeArea2.spatialReference = map.extent.spatialReference;
      _drawSecond = true;
      drawToolbar.fillSymbol = sfs2;
      drawToolbar.lineSymbol = sls2;
      
      drawToolbar.deactivate();
      executeTask();
      lblGuide.text = "Task is executing. Please wait."
     }
    }
   }
   
   //----------------------------------
   // Executing the task
   //----------------------------------
   
   /**
    * Executes the task.
    */
   private function executeTask():void 
   {
    if(_tradeArea1 && _tradeArea2){
     //create the parameters used by this task    
     var params : RemoveOverlapParameters = createParameters();
     
     cursorManager.setBusyCursor();
     
     //Get a static reference to a singleton instance of the BAServerClient class.
     //Instructions for how to create the BAServerClient class is provided at the top of this file.
     var client : BAClient = new BAServerClient;
     client.url = "http://MYSERVERNAME/ArcGIS/baserver/REST/services/DefaultMap/BAServer";
     
     var task :RemoveOverlapTask  = new RemoveOverlapTask(client);
     task.execute(params, new mx.rpc.Responder(resultHandler, faultHandler));
    }
    else{
     Alert.show("The polygon is not set.");
    }
   }
   
   /**
    * Creates parameters of the task. 
    */
   private function createParameters() : RemoveOverlapParameters 
   {
    var params : RemoveOverlapParameters = new RemoveOverlapParameters();
    params.outputSpatialReference = map.extent.spatialReference;
    
    params.overlapMethod = OverlapRemoverOverlapMethod.GRID;
    params.weightMethod = OverlapRemoverWeightMethod.USE_AREA;
    params.areaLinkField = "AREA_ID";
    
    // features - from drawn polygon
    var features:Array = new Array();
    var attr1:Object = {
     OID:1,
     AREA_ID:"1_1",
     STORE_ID:"1",
     RING:1,
     RING_DEFN:"5",
     AREA_DESC:"Area 1",
     SALES : "100",
     COUNT : "3"};
    
    var feature1:Graphic = new Graphic(_tradeArea1, null, attr1);
    features.push(feature1);
    
    var attr2:Object = {
     OID:2,
     AREA_ID:"2_1",
     STORE_ID:"2",
     RING:1,
     RING_DEFN:"5",
     AREA_DESC:"Area 2",
     SALES : "300",
     COUNT : "5"};
    
    var feature2:Graphic = new Graphic(_tradeArea2, null, attr2);
    
    features.push(feature2);
    
    var fs:FeatureSet = new FeatureSet(features);
    fs.geometryType = Geometry.POLYGON;
    fs.spatialReference = _tradeArea1.spatialReference;
    
    params.boundaries = new Boundaries( fs );
    
    return params;
   }
   
   /**
    *  Result handler for the successful completion of the task execution. 
    */                
   private function resultHandler(event:BATaskCompletedEvent, token:Object=null):void 
   {
    var taskResultOutput : TaskResultOutput = event.result;
    //draw the features on the map
    var fs : FeatureSet = taskResultOutput.recordSet;
    var g : Graphic = fs.features[0];
    tradeAreasLayer.add(g);
    
    //if(fs){
    //tradeAreasLayer.clear();
    //resultLayer.clear();
     // add the resulting features to map
     //for (var i:Number = 0; i < fs.features.length; i++) {
      //var g : Graphic = fs.features;
      // set tooltip from attributes
      //g.toolTip = fs.features.attributes["AREA_DESC"];
      //g.autoMoveToTop = false;
      //tradeAreasLayer.add(g);
     //}
     
     //zoom to the feature extent 
     //map.extent = 
     // GraphicUtil.getGraphicsExtent(resultLayer.graphicProvider.source as Array).expand(1.25);
    //}
    cursorManager.removeBusyCursor();
    lblGuide.text = String(taskResultOutput);//"Task complete. The trade areas with the removed overlapping areas are displayed."
   }
   
   /**
    *  Generalized fault handler for an asynchronous failed task execution. 
    */  
   private function faultHandler(event:FaultEvent, token:Object=null):void 
   {
    var message:String = "An error occurred while executing the underlying Web Service request.";
    message += " Please try again later.";
    
    Alert.show(message, "Error");
    cursorManager.removeBusyCursor();
    lblGuide.text = "Task failed.";
    
    resultLayer.clear();
    tradeAreasLayer.clear();
    map.extent = _initialExtent;
   }
  ]]>
 </fx:Script>
 <fx:Declarations>
  <!-- Set symbol for polygon draw 1 -->
  <esri:SimpleLineSymbol id="sls" style="solid" color="0xFF0000" width="1" alpha="1"/>
  <esri:SimpleFillSymbol id="sfs" alpha="0.6" color="0xFF0000">        
   <esri:SimpleLineSymbol color="#F00000" width="4" alpha="1" style="solid"/>    
  </esri:SimpleFillSymbol>
  
  <!-- Set symbol for polygon draw 2 -->
  <esri:SimpleLineSymbol id="sls2" style="solid" color="0x00FF00" width="1" alpha="1"/>
  <esri:SimpleFillSymbol id="sfs2" alpha="0.6" color="0x00FF00">        
   <esri:SimpleLineSymbol color="#F00000" width="4" alpha="1" style="solid"/>    
  </esri:SimpleFillSymbol>
  
  <!-- Control to user draw -->
  <esri:DrawTool id="drawToolbar"        
        map="{map}"
        lineSymbol="{sls}"    
        fillSymbol="{sfs}"
        drawEnd="onDrawEnd(event)" />
  
  <!-- Set renderer for Spatial Overlay output feature class -->
  <esri:SimpleFillSymbol id="bFill" alpha="0.5" color="0x0000FF"/>
  <esri:SimpleFillSymbol id="gFill" alpha="0.5" color="0x00FF00"/>
  <esri:SimpleFillSymbol id="rFill" alpha="0.5" color="0xFF0000"/>
  <esri:UniqueValueRenderer id="uniqueValueRenderer" field="STORE_ID">
   <esri:UniqueValueInfo value="1" symbol="{bFill}"/>
   <esri:UniqueValueInfo value="2" symbol="{gFill}"/>
   <esri:UniqueValueInfo value="3" symbol="{rFill}"/>
  </esri:UniqueValueRenderer>
 </fx:Declarations>
 
 <s:controlBarContent>
  <s:Label width="100%"
     id="lblGuide"
     color="#6E6F00"
     fontSize="12" />
 </s:controlBarContent>   
 <!-- Map control -->    
 <esri:Map id="map">        
  <esri:extent>            
   <esri:Extent xmin="-13051515.8843363" ymin="4020082.2778777" xmax="-13030416.9436797" ymax="4043380.91587083">                
    <esri:SpatialReference wkid="3857"/>            
   </esri:Extent>        
  </esri:extent>        
  <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
  <!-- Graphics Layer to draw both user input and resulting features-->        
  <esri:GraphicsLayer id="tradeAreasLayer" renderer="{uniqueValueRenderer}"/>
  <esri:GraphicsLayer id="resultLayer" renderer="{uniqueValueRenderer}"/>
 </esri:Map>
</s:Application>

0 Kudos
SeanCook
New Contributor
What I removed for brevity:

    <fx:Script>
        <![CDATA[
            import com.esri.ags.FeatureSet;
            import com.esri.ags.Graphic;
            import com.esri.ags.events.DrawEvent;
            import com.esri.ags.geometry.Geometry;
            import com.esri.ags.geometry.Polygon;
            import com.esri.ags.utils.GraphicUtil;
            import com.esri.bacore.BATaskCompletedEvent;
            import com.esri.bacore.TaskResultOutput;
            import com.esri.bacore.client.BAClient;
            import com.esri.baserver.Boundaries;
            import com.esri.baserver.OverlapRemoverOverlapMethod;
            import com.esri.baserver.OverlapRemoverWeightMethod;
            import com.esri.baserver.sampleviewer.BASExampleClient;
            import com.esri.baserver.sampleviewer.Geofence;
            import com.esri.baserver.tasks.tradeareas.RemoveOverlapParameters;
            import com.esri.baserver.tasks.tradeareas.RemoveOverlapTask;
            
            import mx.controls.Alert;
            import mx.rpc.Responder;
            import mx.rpc.events.FaultEvent;
            
            //----------------------------------
            // Internal variables
            //----------------------------------
            
            // Drawn trade area polygon 1
            private var _tradeArea1 : Polygon;
            
            // Drawn trade area polygon 1
            private var _tradeArea2 : Polygon;
            
            // Flag to distinct first and second trade area draw.
            private var _drawSecond : Boolean = false;
            
            // Initial map extent.
            private var _initialExtent : Extent;
            
            //----------------------------------
            // Initializing
            //----------------------------------
            
0 Kudos
SeanCook
New Contributor
So has anyone ever gotten this to work independently? Even directly copying ESRI code I get results, but they have a size of zero. I honestly don't care who or how, I just want to see this implemented so I know the function isn't broken, my current theory.

This post is now the second top hit on google when searching for this call, so A. It shows how few people have done this and B. It would be nice if we knew if it was functional, and if so, why the example no longer seems to work so others might see it.
0 Kudos
by Anonymous User
Not applicable
Hi Scott,

I started with this sample code from the BA Server Remove Overlap example:

http://baserver.esri.com/BAS_Flex/SamplesExplorer.html?sample=RemoveOverlap

I am using Flex 4.5.1 with the ArcGIS API for Flex v2.4 and the Business Analyst API for Flex 2.2.  Here is a screenshot of the SWC???s in my Project -> Properties -> Flex Build Path -> Library Path tab:

[ATTACH=CONFIG]13517[/ATTACH]

After copying and pasting the sample mxml code from (1) into a new MXML application and properly referencing the libraries in (2), I made the following code changes:

a. I updated the namespaces (this may vary based on the libraries you reference):

[ATTACH=CONFIG]13518[/ATTACH]


b. I commented out the sample viewer-specific import statements and added the BAServerClient namespace:

[ATTACH=CONFIG]13519[/ATTACH]

c. Finally, in the executeTask() function, I commented out the Sample Viewer-specific BAClient instance and replaced it with a BAServerClient instance while assigning its URL property the service endpoint for our demo server instance (which contains a partial/sample dataset and does not have other security features enabled for demo purposes)  Note that your server instance endpoint may differ based on your configuration, security settings, and map service name: http://{host}:{port}/ArcGIS/baserver/REST/services/{service}/BAServer:

[ATTACH=CONFIG]13520[/ATTACH]

After, making the modifications, I ran the task in Flex Builder and it worked fine.

The next post will be the MXML.

Chris
0 Kudos
by Anonymous User
Not applicable
<?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:mx="library://ns.adobe.com/flex/mx" 
      pageTitle="Example - Using Esri Business Analyst Server API for Flex to execute a Remove Overlap task."
      creationComplete="startSample()" xmlns:esri="http://www.esri.com/2008/ags">
 <fx:Script>
  <![CDATA[
   import com.esri.ags.FeatureSet;
   import com.esri.ags.Graphic;
   import com.esri.ags.events.DrawEvent;
   import com.esri.ags.geometry.Extent;
   import com.esri.ags.geometry.Geometry;
   import com.esri.ags.geometry.Polygon;
   import com.esri.ags.utils.GraphicUtil;
   import com.esri.bacore.BATaskCompletedEvent;
   import com.esri.bacore.TaskResultOutput;
   import com.esri.bacore.client.BAClient;
   import com.esri.baserver.Boundaries;
   import com.esri.baserver.OverlapRemoverOverlapMethod;
   import com.esri.baserver.OverlapRemoverWeightMethod;
   //import com.esri.baserver.sampleviewer.BASExampleClient;
   //import com.esri.baserver.sampleviewer.Geofence;
   import com.esri.baserver.tasks.BAServerClient;  // Added
   import com.esri.baserver.tasks.tradeareas.RemoveOverlapParameters;
   import com.esri.baserver.tasks.tradeareas.RemoveOverlapTask;
   
   import mx.controls.Alert;
   import mx.rpc.Responder;
   import mx.rpc.events.FaultEvent;
   
   private var _tradeArea1 : Polygon;
   
   private var _tradeArea2 : Polygon;
   
   private var _drawSecond : Boolean = false;
   
   // Initial map extent.
   private var _initialExtent :Extent;
   
   
   /**
    * Initialize the polygon draw at sample creating
    */
   private function startSample():void 
   {
    _initialExtent = map.extent;
    
    lblGuide.text = "This sample demonstrates setting up multiple trade or service areas " +
     "and removing any overlaps between them. To begin, draw a polygon area " +
     "to represent the first of two sample trade area polygons.";
    
    drawToolbar.activate(DrawTool.POLYGON);
   }
   
   /**
    * Event handler for draw completing event;
    * capture the graphics from draw tollbar, 
    * add the graphics to Map and create an object
    * based on graphic drawn. 
    */
   private function onDrawEnd(event:DrawEvent):void  
   {                
    var graphic:Graphic = event.graphic;  
    graphic.autoMoveToTop = false;
    
    /*
    if(!Geofence.checkGeometry(graphic.geometry))
    {
     map.extent = _initialExtent;
     return;
    }
    */
    
    tradeAreasLayer.add(graphic);             
    
    // Capture the polygon geometry from the draw toolbar.
    if (event.graphic.geometry is Polygon) {
     if (!_drawSecond) {
      _tradeArea1 = Polygon(event.graphic.geometry);
      _tradeArea1.spatialReference = map.extent.spatialReference;
      
      _drawSecond = true;
      drawToolbar.deactivate();
      drawToolbar.fillSymbol = sfs2;
      drawToolbar.lineSymbol = sls2;
      drawToolbar.activate(DrawTool.POLYGON);
      lblGuide.text = "Now draw your second and last sample trade area polygon. " +
       "In order to best view the results, " +
       "be sure that your second area overlaps the first.";
     }
     else {
      _tradeArea2 = Polygon(event.graphic.geometry);
      _tradeArea2.spatialReference = map.extent.spatialReference;
      _drawSecond = true;
      drawToolbar.fillSymbol = sfs2;
      drawToolbar.lineSymbol = sls2;
      
      drawToolbar.deactivate();
      executeTask();
      lblGuide.text = "Task is executing. Please wait."
     }
    }
   }
   
   /**
    * Executes the task.
    */
   private function executeTask():void 
   {
    if(_tradeArea1 && _tradeArea2){
     //create the parameters used by this task    
     var params : RemoveOverlapParameters = createParameters();
     
     cursorManager.setBusyCursor();
     
     //Get a static reference to a singleton instance of the BAServerClient class.
     //Instructions for how to create the BAServerClient class is provided at the top of this file.
     //var client : BAClient = BASExampleClient.instance;
     var client :BAServerClient = new BAServerClient(); // ADDED
     client.url = "http://baserver.esri.com/ArcGIS/baserver/REST/services/RedlandsDemoMap/BAServer"; // ADDED
     
     var task : RemoveOverlapTask  = new RemoveOverlapTask(client);
     task.execute(params, new mx.rpc.Responder(resultHandler, faultHandler));
     
     

    }
    else{
     Alert.show("The polygon is not set.");
    }
   }
   
   /**
    * Creates parameters of the task. 
    */
   private function createParameters() : RemoveOverlapParameters 
   {
    var params : RemoveOverlapParameters = new RemoveOverlapParameters();
    params.outputSpatialReference = map.extent.spatialReference;
    
    params.overlapMethod = OverlapRemoverOverlapMethod.GRID;
    params.weightMethod = OverlapRemoverWeightMethod.USE_AREA;
    params.areaIDField = "AREA_ID";
    
    // features - from drawn polygon
    var features:Array = new Array();
    var attr1:Object = {
     OID:1,
     AREA_ID:"1_1",
     STORE_ID:"1",
     RING:1,
     RING_DEFN:"5",
     AREA_DESC:"Area 1",
     SALES : "100",
     COUNT : "3"};
    
    var feature1:Graphic = new Graphic(_tradeArea1, null, attr1);
    features.push(feature1);
    
    var attr2:Object = {
     OID:2,
     AREA_ID:"2_1",
     STORE_ID:"2",
     RING:1,
     RING_DEFN:"5",
     AREA_DESC:"Area 2",
     SALES : "300",
     COUNT : "5"};
    
    var feature2:Graphic = new Graphic(_tradeArea2, null, attr2);
    
    features.push(feature2);
    
    var fs:FeatureSet = new FeatureSet(features);
    fs.geometryType = Geometry.POLYGON;
    fs.spatialReference = _tradeArea1.spatialReference;
    
    params.boundaries = new Boundaries( fs );
    
    return params;
   }
   
   /**
    *  Result handler for the successful completion of the task execution. 
    */                
   private function resultHandler(event:BATaskCompletedEvent, token:Object=null):void 
   {
    var taskResultOutput : TaskResultOutput = event.result;
    //draw the features on the map
    var fs : FeatureSet = taskResultOutput.recordSet;
    
    if(fs){
     tradeAreasLayer.clear();
     resultLayer.clear();
     // add the resulting features to map
     for (var i:Number = 0; i < fs.features.length; i++) {
      var g : Graphic = fs.features;
      // set tooltip from attributes
      g.toolTip = fs.features.attributes["AREA_DESC"];
      g.autoMoveToTop = false;
      resultLayer.add(g);
     }
     
     //zoom to the feature extent 
     map.extent = 
      GraphicUtil.getGraphicsExtent(resultLayer.graphicProvider.source as Array).expand(1.25);
    }
    cursorManager.removeBusyCursor();
    lblGuide.text = "Task complete. The trade areas with the removed overlapping areas are displayed."
   }
   
   /**
    *  Generalized fault handler for an asynchronous failed task execution. 
    */  
   private function faultHandler(event:FaultEvent, token:Object=null):void 
   {
    var message:String = "An error occurred while executing the underlying Web Service request.";
    message += " Please try again later.";
    
    Alert.show(message, "Error");
    cursorManager.removeBusyCursor();
    lblGuide.text = "Task failed.";
    
    resultLayer.clear();
    tradeAreasLayer.clear();
    map.extent = _initialExtent;
   }
  ]]>
 </fx:Script>
 <fx:Declarations>
  <!-- Set symbol for polygon draw 1 -->
  <esri:SimpleLineSymbol id="sls" style="solid" color="0xFF0000" width="1" alpha="1"/>
  <esri:SimpleFillSymbol id="sfs" alpha="0.6" color="0xFF0000">        
   <esri:SimpleLineSymbol color="#F00000" width="4" alpha="1" style="solid"/>    
  </esri:SimpleFillSymbol>
  
  <!-- Set symbol for polygon draw 2 -->
  <esri:SimpleLineSymbol id="sls2" style="solid" color="0x00FF00" width="1" alpha="1"/>
  <esri:SimpleFillSymbol id="sfs2" alpha="0.6" color="0x00FF00">        
   <esri:SimpleLineSymbol color="#F00000" width="4" alpha="1" style="solid"/>    
  </esri:SimpleFillSymbol>
  
  <!-- Control to user draw -->
  <esri:DrawTool id="drawToolbar"        
        map="{map}"
        lineSymbol="{sls}"    
        fillSymbol="{sfs}"
        drawEnd="onDrawEnd(event)" />
  
  <!-- Set renderer for Spatial Overlay output feature class -->
  <esri:SimpleFillSymbol id="bFill" alpha="0.5" color="0x0000FF"/>
  <esri:SimpleFillSymbol id="gFill" alpha="0.5" color="0x00FF00"/>
  <esri:SimpleFillSymbol id="rFill" alpha="0.5" color="0xFF0000"/>
  <esri:UniqueValueRenderer id="uniqueValueRenderer" attribute="STORE_ID">
   <esri:UniqueValueInfo value="1" symbol="{bFill}"/>
   <esri:UniqueValueInfo value="2" symbol="{gFill}"/>
   <esri:UniqueValueInfo value="3" symbol="{rFill}"/>
  </esri:UniqueValueRenderer>
 </fx:Declarations>
 
 <s:controlBarContent>
  <s:Label width="100%"
     id="lblGuide"
     color="#6E6F00"
     fontSize="12" />
 </s:controlBarContent>   
 <!-- Map control -->    
 <esri:Map id="map">        
  <esri:extent>            
   <esri:Extent xmin="-13051515.8843363" ymin="4020082.2778777" xmax="-13030416.9436797" ymax="4043380.91587083">                
    <esri:SpatialReference wkid="3857"/>            
   </esri:Extent>        
  </esri:extent>        
  <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
  <!-- Graphics Layer to draw both user input and resulting features-->        
  <esri:GraphicsLayer id="tradeAreasLayer" renderer="{uniqueValueRenderer}"/>
  <esri:GraphicsLayer id="resultLayer" renderer="{uniqueValueRenderer}"/>
 </esri:Map>
</s:Application>
0 Kudos
by Anonymous User
Not applicable
Just in case, I have attached the sample MXML to this reply.

There was a character limit that I was trying to dodge with the previous post.

Chris
0 Kudos
SeanCook
New Contributor
Chris...thank you so much for the time you put into this. It's obvious you did a ton of work and I really appreciate it.

I think there may be something wrong with our BAServer...although I cannot guess what. When I switch the client.url to our own, instead of the normal results, it acts as if it completed the task correctly but zooms in to a ridiculously large scale dead center off the west coast of Africa. With your server it works perfectly.

When I put our respective server names into a web browser, they take me to identical screens (except for the map name). Based on that simple diagnostic mine is running fine. Has the remove overlap task listed correctly, etc.  Is there a known reason my BA server client would behave like that?
0 Kudos