我仍然困惑爲什麼我要'TMapView'在第47行不包含名爲'Location'的成員。我也嘗試混合並且與演示代碼示例相匹配,但我不明白髮生了什麼問題。我的猜測是,我需要一個私人或公共的聲明..但我遇到了很多麻煩,試圖找到適當的文件關於它......沒有得到它基本上。請注意,我對Delphi編程完全陌生。'TMapView'不包含名爲'Location'的成員
下面的代碼:
unit MainUnit;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
FMX.Controls.Presentation, FMX.MultiView, FMX.Layouts, FMX.ExtCtrls, FMX.Maps,
FMX.TabControl;
type
TMainForm = class(TForm)
MultiView1: TMultiView;
MainPanel: TPanel;
HeaderPanel: TPanel;
Button1: TButton;
TabControl1: TTabControl;
TabItem1: TTabItem;
TabItem2: TTabItem;
TabControl2: TTabControl;
PrimaryImageViewer: TImageViewer;
TabItem3: TTabItem;
TabItem4: TTabItem;
PrimaryMapView: TMapView;
SecondaryMapView: TMapView;
SecondaryImageViewer: TImageViewer;
Label1: TLabel;
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
{$R *.fmx}
procedure MainForm.FormShow(Sender: TObject);
begin
SecondaryMapView.Location := TMapCoordinate.Create(59.965, 30.35);
SecondaryMapView.Zoom := 10;
end;
end.
你懂什麼錯誤消息意味着 –
@DavidHeffernan我不明白是什麼意思,但我不明白怎麼解決它。 – exxe
你是否有要交的文件。這有幫助嗎? –