‘TMapView’ does not contain a member named ‘Location’

  

I’m still puzzled as to why I’m getting ‘TMapView’ does not contain a member named ‘Location’ at line 47. I did also try to mix and match with the demo code samples but I don’t understand what’s wrong. My guess is that I would need a private or public declaration..but I’m having a lot of trouble trying to find proper documentation about it…not getting it basically. Please do note that I’m totally new to Delphi programming.

Here’s the code:

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.

Comments are closed.