////////////////////////////////////////////////////////////////////////////////
// 居中RTU
// nFtr - 当前要居中的图元ID, 为0表示没有需要居中的
// nLst - 上一个要恢复的图元, 为0表示没有需要恢复的
// 返回 - 当前居中成功的图元ID
function CenterRtu(aMap: TMap; nFtr, nLst: Integer): Integer;
var
lyr: CMapXLayer;
ftr: CMapXFeature;
sErr : String;
begin
if nLst > 0 then try
lyr := aMap.Layers.Item(1);
ftr := lyr.GetFeatureByID(nLst);
ftr.Style.SymbolBitmapName := '_RtuSel.bmp';
ftr.Update(EmptyParam, EmptyParam);
except
sErr := '处理图元时错误';
end;
if nFtr > 0 then try
lyr := aMap.Layers.Item(1);
ftr := lyr.GetFeatureByID(nFtr);
aMap.ZoomTo(aMap.Zoom, ftr.CenterX, ftr.CenterY);
ftr.Style.SymbolBitmapName := '_Rtu.bmp';
ftr.Update(EmptyParam, EmptyParam);
Result := nFtr;
except
sErr := '处理图元时错误';
end;
end;