Select to view content in your preferred language

How to change the map extent from a selected item in a data grid

567
1
09-22-2011 05:25 AM
MartinSiwek
Emerging Contributor
Hi,

I've setup a query task that calls features from an ArcGIS Map Service and populates an mx datagrid with it's attributes.  I'm trying to write code so that when a user selects an item in the data grid that it zooms to it in the map.  Any suggestion about how I would go about this?

Thanks!
Tags (2)
0 Kudos
1 Reply
ZahidChaudhry
Deactivated User
Hi,

I've setup a query task that calls features from an ArcGIS Map Service and populates an mx datagrid with it's attributes.  I'm trying to write code so that when a user selects an item in the data grid that it zooms to it in the map.  Any suggestion about how I would go about this?

Thanks!


I assume that grid contain Lat/Long, ...on row select creat a mappoint and then call centerAt() function and set scale or level whatever is needed....here is API Reference

[HTML]centerAt () method 
public function centerAt(mapPoint:MapPoint):void
Recenters the map at the specified location.

Parameters

mapPoint:MapPoint �?? The point to center at.[/HTML]

and Example...
http://help.arcgis.com/en/webapi/flex/samples/index.html#/Geocode_an_address/01nq00000068000000
0 Kudos