|
导入MapX控件后,想做添加图元的程序。可是发现很多问题。不知是代码问题还是什么原因,请人帮忙看看。代码是:
procedure TForm1.Button4Click(Sender: TObject);
var
cs:CMapXStyle;
pnt:CMapXPoint;
lyr:layer;//层
ftr:feature;//特征
pt:point;//点
mstyle:style;//样式
x,y:double;
begin
cs:=costyle.create;
cs.SymbolType :=1;
cs.SymbolBitmapSize:=48;
cs.SymbolBitmapName:='RAIL1-32.BMP';
cs.SymbolBitmapTransparent:=true;
pnt:=copoint.Create;
pnt.Set_(50,10);
ftr:=cofeature.Create ;
ftr:=map1.ControlInterface.FeatureFactory.CreateSymbol(pnt,cs);
map1.ControlInterface.Layers['高速公路_50m'].AddFeature(ftr,EmptyParam);
end;
错误]Biz:\YKWLZHXXPT\YSGL\GIS\YWGN1.FUNC.DIR\MAINFORM.FORM.PAS(183, 25): Undeclared identifier "create"
[错误]Biz:\YKWLZHXXPT\YSGL\GIS\YWGN1.FUNC.DIR\MAINFORM.FORM.PAS(188, 14): 不能隐式转换 "CoPoint" 成为 "CMapXPoint"
[错误]Biz:\YKWLZHXXPT\YSGL\GIS\YWGN1.FUNC.DIR\MAINFORM.FORM.PAS(190, 16): 不能隐式转换 "CoFeature" 成为 "CMapXFeature"
[错误]Biz:\YKWLZHXXPT\YSGL\GIS\YWGN1.FUNC.DIR\MAINFORM.FORM.PAS(192, 61): Undeclared identifier "EmptyParam" |
|