Select to view content in your preferred language

DrawTool in the main applicaiton does not respond

543
0
05-24-2011 12:45 PM
MikeCliffton
Emerging Contributor
I create a drawTool, an AttributorInspector, and a map click function in the default application-- index.mxml, but after the flex viewer run, nothing happen in the AttributeInspector when clicking on the map; drawTool function does not respond, either. See drawTool, function and attributeInspector code below. Million Thanks!

private function select_clickHandler():void
{myDrawTool.activate(DrawTool.EXTENT);
}
  
<s:Button id="extentButton"
click="select_clickHandler()"
label="Select by Extent"/> 


protected function map_mapClickHandler(event:MapMouseEvent):void
{// set the selection query based on the click
queryByGeometry.geometry = event.mapPoint;
ViewerContainer.getInstance().mapManager.myFeature.selectFeatures(queryByGeometry); 
} 
//myFeature is a featureLayer I created in the MapManager.mxml inside the com.esri.viewer


<s:BorderContainer>
<esri:AttributeInspector width="150" height="300" 
featureLayers="{[ViewerContainer.getInstance().mapManager.myFeature]}"
formItemsOrder="fieldInspector">
<esri:FieldInspector id="myField" 
featureLayer="{ViewerContainer.getInstance().mapManager.myFeature}" 
fieldName="NAME" label="County Name" >
</esri:FieldInspector>
</esri:AttributeInspector>
</s:BorderContainer>
Tags (2)
0 Kudos
0 Replies