Custom Edit InfoWindow for Flex API

2865
1
09-15-2011 03:18 PM
JHayes
by
Occasional Contributor
Hello people,

I'm sort of a new Flex API'er.  I've been customizing the default editor for a couple days and need some fine tuning. 

Questions 1: How do I customize the default editor InfoWindow comment area?  The boxes are too large where you provide your text/comments.

Question 2: My application had a BorderContainer enclosing the editor and the legend.  However, when you click to add a point with the editor tool in the "right" place, the InfoWindow will be partially covered by the BorderContainer.  I realize that resizing the comment boxes in the InfoWindow will most likely alleviate this problem, but I'd like to know how to do it.

Thanks for the help!!

Here's my code:
<?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="DOE Sidewalk Inventory Comments">
 <!--
 
 This sample shows you how to use the editor component.
 
 -->
 
 <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 com.esri.ags.geometry.MapPoint;
   import com.esri.ags.layers.TiledMapServiceLayer;
   import mx.events.FlexEvent;
   public function turnonbasemap():void
    
   { 
    photo.visible = false;
    
    basemap.visible = true;  
   }
   public function turnonphoto():void
    
   { 
    photo.visible = true;
    
    basemap.visible = false;  
   }
   protected function application1_initializeHandler(event:FlexEvent):void
   {
    
    myEditor.featureLayers = [ sidewalkcomments ];
    
   }
   
  ]]>
  
 </fx:Script>
 
 
 <fx:Declarations>
  
  <esri:GeometryService id="myGeometryService" url="http://webags/ArcGIS/rest/services/Geometry/GeometryServer"/>
  
 </fx:Declarations>
 
 
 
 <esri:Map id="myMap" left="0" right="0" top="0" bottom="4" wrapAround180="true">
  
  <esri:extent>
   
   <esri:Extent id="washco"
       
       xmin="7565269.4485383" ymin="657281.31999349" xmax="7607044.62214942" ymax="696603.368604601">
    
    <esri:SpatialReference wkid="2269"/>
    
   </esri:Extent>
   
  </esri:extent>
  
  <esri:ArcGISTiledMapServiceLayer id="basemap" url="http://webags.co.washington.or.us/ArcGIS/rest/services/Washco_primary_basemap_SP/MapServer"/>
  
  <esri:ArcGISTiledMapServiceLayer id="photo" url="http://webags/ArcGIS/rest/services/Washco_orthos2008_StatePlane/MapServer" visible="false"/>
  
  <esri:ArcGISDynamicMapServiceLayer id="legendLayer" name="Sidewalk Inventory" url="http://webgis-vm/ArcGIS/rest/services/DOE/DOE_Sidewalk/MapServer"/> 
  
  <esri:FeatureLayer id="sidewalkcomments"
         mode="snapshot"
         outFields="
  • "
  •          url="http://webags.co.washington.or.us/ArcGIS/rest/services/Planning/Web_Comments_Sidewalk/FeatureServer/0"/> </esri:Map>   <s:Button right="40" top="31" width="94" height="31" label="Photo" fontWeight="bold" fontSize="16" click="turnonphoto()"/>   <s:Button right="134" top="31" width="106" height="31" label="Basemap" fontWeight="bold" fontSize="16"       click="turnonbasemap()"/> <s:BorderContainer bottom="6" width="670" height="175" borderColor="#808080" borderWeight="2" fontWeight="bold"         cornerRadius="5" horizontalCenter="74">     <s:layout>    <s:HorizontalLayout paddingBottom="15" paddingTop="15" paddingLeft="15" paddingRight="15"/>   </s:layout>     <esri:Editor id="myEditor" bottom="4" width="200" height="120"       geometryService="{myGeometryService}" horizontalCenter="-204" map="{myMap}"       skinClass="com.esri.ags.skins.EditorSkin"/>     <esri:Legend id="myLegend" right="10" bottom="10" width="429" height="150" chromeColor="#CCCACA"       layers="{[ legendLayer ]}" map="{myMap}" respectCurrentMapScale="true"       skinClass="com.esri.ags.skins.LegendSkin"/>   <esri:Editor x="209" y="330" width="193" height="102"/> </s:BorderContainer>  </s:Application>
    Tags (2)
    0 Kudos
    1 Reply
    JHayes
    by
    Occasional Contributor
    I also have a related question here
    0 Kudos