1
1234abcd
Unregistered / Unconfirmed
GUEST, unregistred user!
[?]//获得并显示指定图层的投影信息
procedure TfrmProjector.ReportLyrCS(LyrCS : IMOMapLayer);
var
ParamStr : IMOStrings;
Info:TStringList;
begin
Info:=TStringList.Create;
If LyrCS.CoordinateSystem.IsProjected then
begin
ParamStr:= IMOStrings(CreateOleObject('MapObjects2.Strings'));
ParamStr.PopulateWithParameters(LyrCS.CoordinateSystem.Projection.Type_);//此句出现问题
//错误信息EOleError:Method 'Type_' not supported by automation object
Info.Add('Layer CoordSys: ');
Info.Add('Projected Coordinate System' );
Info.Add('Projection: ' + LyrCS.CoordinateSystem.Projection.Name);
Info.Add('Name: '+LyrCS.CoordinateSystem.Name);
Info.Add('Unit: ' + LyrCS.CoordinateSystem.Projection.Unit_.Name);//此句出现问题
//错误信息EOleError:Method 'Unit_' not supported by automation object
Info.Add('Datum: ' + LyrCS.CoordinateSystem.GeoCoordSys.Datum.Name);
Info.Add('Speroid: ' + LyrCS.CoordinateSystem.GeoCoordSys.Datum.Spheroid.Name);
end;
MemoCSLyr.Lines.Assign(Info);//MemoCSMap : TMemo
Info.Destroy;
end;
procedure TfrmProjector.ReportLyrCS(LyrCS : IMOMapLayer);
var
ParamStr : IMOStrings;
Info:TStringList;
begin
Info:=TStringList.Create;
If LyrCS.CoordinateSystem.IsProjected then
begin
ParamStr:= IMOStrings(CreateOleObject('MapObjects2.Strings'));
ParamStr.PopulateWithParameters(LyrCS.CoordinateSystem.Projection.Type_);//此句出现问题
//错误信息EOleError:Method 'Type_' not supported by automation object
Info.Add('Layer CoordSys: ');
Info.Add('Projected Coordinate System' );
Info.Add('Projection: ' + LyrCS.CoordinateSystem.Projection.Name);
Info.Add('Name: '+LyrCS.CoordinateSystem.Name);
Info.Add('Unit: ' + LyrCS.CoordinateSystem.Projection.Unit_.Name);//此句出现问题
//错误信息EOleError:Method 'Unit_' not supported by automation object
Info.Add('Datum: ' + LyrCS.CoordinateSystem.GeoCoordSys.Datum.Name);
Info.Add('Speroid: ' + LyrCS.CoordinateSystem.GeoCoordSys.Datum.Spheroid.Name);
end;
MemoCSLyr.Lines.Assign(Info);//MemoCSMap : TMemo
Info.Destroy;
end;