Lisa, Here is some code to do this in FlexViewer 2.1 Just replace the existing function in MapManager.mxml with this one.
//map load complete
private function mapLoadComplete(event:MapEvent):void
{
try
{
if (ExternalInterface.available)
{
var result:URLVariables = new URLVariables();
var urlSubstring:String = ExternalInterface.call("window.location.search.substring", 1);
if (urlSubstring && urlSubstring.length > 0 && urlSubstring != "debug=true")
{
result.decode(urlSubstring);
// Parse URL
var xExt:String;
var xUrlParam:String;
var yLat:String;
var xLon:String;
var mScale:String;
if (result["EXT"])
xExt = result.EXT;
if (result["LAT"])
yLat = result.LAT;
if (result["LON"])
xLon = result.LON;
if (result["SCALE"])
mScale = result.SCALE;
if(!yLat == "" && !xLon == "")
{
var spatRef:SpatialReference = new SpatialReference(4326);
var cPoint:MapPoint = new MapPoint(parseFloat(xLon), parseFloat(yLat),spatRef);
if(!mScale==""){
map.scale = parseInt(mScale);
}else{
map.scale = 20000;
}
if (map.spatialReference.wkid != 4326)
{
map.cursorManager.setBusyCursor();
var geomServ:GeometryService = new GeometryService("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
geomServ.addEventListener(GeometryServiceEvent.PROJECT_COMPLETE,pResult);
geomServ.addEventListener(FaultEvent.FAULT,pFault);
geomServ.project([cPoint],map.spatialReference);
function pResult(event:GeometryServiceEvent):void{
var pt:MapPoint = (event.result as Array)[0]as MapPoint;
map.centerAt(pt);
map.cursorManager.removeBusyCursor();
}
function pFault(err:Object):void{
map.cursorManager.removeBusyCursor();
}
} else{
map.centerAt(cPoint);
}
}
if (!xExt == ""){
var extArray:Array = xExt.split(",");
var extent:Extent = new Extent(Number(extArray[0]), Number(extArray[1]), Number(extArray[2]), Number(extArray[3]),map.spatialReference);
map.extent = extent;
}
}
}
}
catch (error:Error){}
}
And add these imports to the MapManager.mxml too.
import com.esri.ags.events.GeometryServiceEvent;
import com.esri.ags.geometry.MapPoint;
import com.esri.ags.tasks.GeometryService;
import com.esri.ags.geometry.Geometry;
And feed it a url like this?LON=-111.88376501599998&LAT=40.75807050000003&SCALE=10000