L
lhw8001
Unregistered / Unconfirmed
GUEST, unregistred user!
我先在mapinfo中做好了一个图层symbol,然后想在程序中把这个层中的一个图元复制到另外一个新建的层newlayer中,newlayer是在mapinfo中事先建好的,我用的clone,但是程序执行后在发现newlayer中添加进去了新纪录,但是却没有显示出来的图形,刚刚学习,请大家指教!
procedure TForm1.Map1ToolUsed(ASender: TObject;
ToolNum: Smallint;
X1, Y1,
X2, Y2, Distance:do
uble;
Shift, Ctrl: WordBool;
var EnableDefault: WordBool);
var
symbol_feature:variant;
new_feature:variant;
tempfeature:variant;
begin
if ToolNum=100 then
begin
map1.Layers.Item('symbol').Editable:=true;
map1.Layers.Item('newlayer').Editable:=true;
symbol_feature:=map1.Layers.Item('symbol').AllFeatures.Item(5);
tempfeature:=symbol_feature.clone;
new_feature:=map1.Layers.Item('newlayer').AddFeature(tempfeature,EmptyParam);
new_feature.Update;
map1.Layers.Item('newlayer').Refresh;
end;
procedure TForm1.Map1ToolUsed(ASender: TObject;
ToolNum: Smallint;
X1, Y1,
X2, Y2, Distance:do
uble;
Shift, Ctrl: WordBool;
var EnableDefault: WordBool);
var
symbol_feature:variant;
new_feature:variant;
tempfeature:variant;
begin
if ToolNum=100 then
begin
map1.Layers.Item('symbol').Editable:=true;
map1.Layers.Item('newlayer').Editable:=true;
symbol_feature:=map1.Layers.Item('symbol').AllFeatures.Item(5);
tempfeature:=symbol_feature.clone;
new_feature:=map1.Layers.Item('newlayer').AddFeature(tempfeature,EmptyParam);
new_feature.Update;
map1.Layers.Item('newlayer').Refresh;
end;