Delphi6+mapx4.5 查找图元

procedure TForm1.Button1Click(Sender: TObject);
var
ftr :CMapxFeature;
lyr :CmapxLayer;
ds :CMapxDataset;
ftrs :Cmapxfeatures;
begin
lyr:=Map1.Layers.Item(1);
ds:=map1.datasets.Add(miDatasetLayer,lyr,EmptyParam,emptyparam,emptyparam,emptyparam,
emptyparam, emptyparam);
ftrs:=lyr.Search('name like "开发区管委会"');
if ftrs.count>0 then
begin
ftr :=ftrs.Item(1);
lyr.Selection.Replace(ftr);
map1.ZoomTo(map1.zoom, ftr.centerX,ftr.CenterY);
end;
end;

Technorati 标签: Delphi Mapx4.5 查找图元
posted @ 2010-12-13 23:50  googlegis  阅读(170)  评论(0编辑  收藏  举报

坐标合肥,非典型GIS开发人员 GitHub