function TLayers.CreateLayer(const Name: WideString): CMapXLayer;
begin
Result := DefaultInterface.CreateLayer(Name, EmptyParam, EmptyParam, EmptyParam, EmptyParam);
end;
function TLayers.CreateLayer(const Name: WideString; FileSpec: OleVariant): CMapXLayer;
begin
Result := DefaultInterface.CreateLayer(Name, FileSpec, EmptyParam, EmptyParam, EmptyParam);
end;
function TLayers.CreateLayer(const Name: WideString; FileSpec: OleVariant; Position: OleVariant): CMapXLayer;
begin
Result := DefaultInterface.CreateLayer(Name, FileSpec, Position, EmptyParam, EmptyParam);
end;
function TLayers.CreateLayer(const Name: WideString; FileSpec: OleVariant; Position: OleVariant;
KeyLength: OleVariant): CMapXLayer;
begin
Result := DefaultInterface.CreateLayer(Name, FileSpec, Position, KeyLength, EmptyParam);
end;
function TLayers.CreateLayer(const Name: WideString; FileSpec: OleVariant; Position: OleVariant;
KeyLength: OleVariant; CoordSys: OleVariant): CMapXLayer;
begin
Result := DefaultInterface.CreateLayer(Name, FileSpec, Position, KeyLength, CoordSys);
end;
这是Delphi中生成的代码,你可以看到CreateLayer有多种实现,如果需要
m_Layer := EyeMap.Layers.CreateLayer('NavLayer',EmptyParam,EmptyParam,EmptyParam,EmptyParam);
改成这样的写法是一样的
m_Layer := EyeMap.Layers.CreateLayer('NavLayer');
所以平台上也是写成
m_Layer := EyeMap.Layers.CreateLayer('NavLayer');
就可以了 |