You've already forked lazarus-ccr
lazMapViewer: Remove dependence on synapse
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6308 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -4,5 +4,36 @@ object Form1: TForm1
|
||||
Top = 127
|
||||
Width = 869
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 545
|
||||
ClientWidth = 869
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
LCLVersion = '1.9.0.0'
|
||||
object Panel1: TPanel
|
||||
Left = 632
|
||||
Height = 545
|
||||
Top = 0
|
||||
Width = 237
|
||||
Align = alRight
|
||||
Caption = 'Panel1'
|
||||
TabOrder = 0
|
||||
end
|
||||
object MapView1: TMapView
|
||||
Left = 0
|
||||
Height = 545
|
||||
Top = 0
|
||||
Width = 632
|
||||
Active = False
|
||||
Align = alClient
|
||||
CacheOnDisk = True
|
||||
CachePath = 'cache/'
|
||||
InactiveColor = clWhite
|
||||
MapProvider = 'OpenStreetMap Mapnik'
|
||||
UseThreads = True
|
||||
Zoom = 0
|
||||
end
|
||||
object GeoNames: TMVGeoNames
|
||||
left = 481
|
||||
top = 256
|
||||
end
|
||||
end
|
||||
|
@ -5,13 +5,19 @@ unit Main;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls;
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, mvgeonames,
|
||||
mvMapViewer;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
MapView1: TMapView;
|
||||
GeoNames: TMVGeoNames;
|
||||
Panel1: TPanel;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
@ -25,5 +31,23 @@ implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
mvTypes;
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
MapView1.DoubleBuffered := true;
|
||||
MapView1.Zoom := 7;
|
||||
GeoNames.LocationName := 'New York';
|
||||
MapView1.Center := GeoNames.Search(MapView1.DownloadEngine);
|
||||
end;
|
||||
|
||||
procedure TForm1.FormShow(Sender: TObject);
|
||||
begin
|
||||
MapView1.Active := true;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Reference in New Issue
Block a user