Select to view content in your preferred language

Cannot Zoom to data found from IdentifyTask

846
3
05-27-2011 12:37 PM
DidumAbraham
Deactivated User
I'm using the identify feature from esri samples page at
http://help.arcgis.com/en/webapi/flex/samples/index.html. I have populated the data found to a datagrid, but when I click on a record in the datagrid to zoom to that data on the map, it fails to do so and results in error.  If you've found a way to around this issue, I could use your help.
Tags (2)
0 Kudos
3 Replies
by Anonymous User
Not applicable
What is the error? Can you provide any more details?
0 Kudos
DidumAbraham
Deactivated User
MichaelK,

I have attached a jpg image file to this thread. These are the errors coming from the app I'm currently working on...

At line 136 in bldgSchIdentify.mxml, here is the script:
 protected function onItemClick(event:ListEvent):void
 {
  var mygraphic:Graphic = findAttributes(event.itemRenderer.data); //line 136
  mygraphic.symbol = sms_fExp;           
 }


At line 143 in bldgSchIdentify.mxml, code is:
public function findAttributes(myAttr:Object):Graphic {
 for each(var mGra:Graphic in myGraphicsLayer.graphicProvider) {
  if(mGra.attributes === myAttr) {
   myMap.extent = mGra.geometry.extent.expand(2.8); //line 143
   return mGra;
  }
 }
 return null;
}


And here's the final code line:
<mx:DataGrid id="myGrid" width="100%" height="100%" visible="false" color="0x006699"
 editable="false" itemClick="onItemClick(event)" /> <!--line 201-->
0 Kudos
DidumAbraham
Deactivated User
Disregard this thread as I have resolved my issues and had completed all widgets.
0 Kudos