You've already forked lazarus-ccr
LazMapViewer: Add URLs for Google maps.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6838 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="MapViewer_Demo"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
@ -15,7 +17,7 @@
|
||||
</XPManifest>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
|
@ -34,6 +34,7 @@ object MainForm: TMainForm
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 8
|
||||
DropDownCount = 24
|
||||
ItemHeight = 15
|
||||
OnChange = CbProvidersChange
|
||||
Style = csDropDownList
|
||||
|
@ -259,6 +259,9 @@ var
|
||||
bmp: TBitmap;
|
||||
img: TLazIntfImage;
|
||||
begin
|
||||
if not (ACanvas is TFPCustomCanvas) then
|
||||
exit;
|
||||
|
||||
// Screen coordinates of the GPS point
|
||||
P := TMapView(Sender).LonLatToScreen(APoint.RealPoint);
|
||||
|
||||
@ -273,7 +276,7 @@ begin
|
||||
txt := APoint.Name;
|
||||
bmp := TBitmap.Create;
|
||||
try
|
||||
bmp.PixelFormat := pf32Bit;
|
||||
// bmp.PixelFormat := pf32Bit;
|
||||
w := bmp.Canvas.TextWidth(txt);
|
||||
h := bmp.Canvas.TextHeight(txt);
|
||||
bmp.SetSize(w, h);
|
||||
|
@ -68,7 +68,6 @@ var
|
||||
realURL: String;
|
||||
i: Integer;
|
||||
begin
|
||||
inherited DownloadFile(Url, str);
|
||||
FHttp := THTTPSend.Create;
|
||||
try
|
||||
if FUseProxy then
|
||||
|
@ -68,7 +68,6 @@ procedure TMVDEFPC.DownloadFile(const Url: string; AStream: TStream);
|
||||
var
|
||||
http: TFpHttpClient;
|
||||
begin
|
||||
inherited;
|
||||
http := TFpHttpClient.Create(nil);
|
||||
try
|
||||
{$IF FPC_FullVersion >= 30000}
|
||||
|
@ -761,14 +761,25 @@ end;
|
||||
|
||||
procedure TMapViewerEngine.RegisterProviders;
|
||||
begin
|
||||
AddMapProvider('Aucun','',0,30, 0);
|
||||
{
|
||||
AddMapProvider('Google Satellite','http://khm%d.google.com/kh/v=82&x=%x%&y=%y%&z=%z%&s=Ga',4);
|
||||
// AddMapProvider('Aucun','',0,30, 0); ???
|
||||
|
||||
AddMapProvider('Google Normal',
|
||||
'http://mt%serv%.google.com/vt/lyrs=m@145&v=w2.104&x=%x%&y=%y%&z=%z%',
|
||||
0, 19, 4, nil);
|
||||
AddMapProvider('Google Hybrid',
|
||||
'http://mt%serv%.google.com/vt/lyrs=h@145&v=w2.104&x=%x%&y=%y%&z=%z%',
|
||||
0, 19, 4, nil);
|
||||
AddMapProvider('Google Physical',
|
||||
'http://mt%serv%.google.com/vt/lyrs=t@145&v=w2.104&x=%x%&y=%y%&z=%z%',
|
||||
0, 19, 4, nil);
|
||||
|
||||
{
|
||||
AddMapProvider('Google Hybrid','http://khm%d.google.com/kh/v=82&x=%x%&y=%y%&z=%z%&s=Ga',4);
|
||||
AddMapProvider('Google Hybrid','http://mt%d.google.com/vt/lyrs=h@145&v=w2.104&x=%d&y=%d&z=%z%',4);
|
||||
AddMapProvider('Google physical','http://mt%d.google.com/vt/lyrs=t@145&v=w2.104&x=%d&y=%d&z=%z%',4);
|
||||
AddMapProvider('Google Physical Hybrid','http://mt%d.google.com/vt/lyrs=t@145&v=w2.104&x=%x%&y=%y%&z=%z%',4);
|
||||
AddMapProvider('Google Physical Hybrid','http://mt%d.google.com/vt/lyrs=h@145&v=w2.104&x=%x%&y=%y%&z=%z%',4);}
|
||||
AddMapProvider('Google Physical Hybrid','http://mt%d.google.com/vt/lyrs=h@145&v=w2.104&x=%x%&y=%y%&z=%z%',4);
|
||||
}
|
||||
//AddMapProvider('OpenStreetMap Osmarender','http://%serv%.tah.openstreetmap.org/Tiles/tile/%z%/%x%/%y%.png',0,20,3, @getLetterSvr); // [Char(Ord('a')+Random(3)), Z, X, Y]));
|
||||
//AddMapProvider('Yahoo Normal','http://maps%serv%.yimg.com/hx/tl?b=1&v=4.3&.intl=en&x=%x%&y=%y%d&z=%d&r=1' , 0,20,3,@GetYahooSvr, nil, @getYahooY, @GetYahooZ); //(Z+1]));
|
||||
//AddMapProvider('Yahoo Satellite','http://maps%serv%.yimg.com/ae/ximg?v=1.9&t=a&s=256&.intl=en&x=%d&y=%d&z=%d&r=1', 0,20,3,@GetYahooSvr, nil, @getYahooY, @GetYahooZ); //[Random(3)+1, X, YahooY(Y), Z+1]));
|
||||
@ -806,8 +817,6 @@ begin
|
||||
AddMapProvider('Ovi Physical',
|
||||
'http://%serv%.maptile.maps.svc.ovi.com/maptiler/v2/maptile/newest/terrain.day/%z%/%x%/%y%/256/png8',
|
||||
0, 20, 5, @GetLetterSvr);
|
||||
// AddMapProvider('Google Normal', 'http://mt%d.google.com/vt/lyrs=m@145&v=w2.104&x=%d&y=%d&z=%d', [Random(4), X, Y, Z]));
|
||||
|
||||
|
||||
{
|
||||
AddMapProvider('Yahoo Normal','http://maps%serv%.yimg.com/hx/tl?b=1&v=4.3&.intl=en&x=%x%&y=%y%d&z=%d&r=1' , 0,20,3,@GetYahooSvr, nil, @getYahooY, @GetYahooZ); //(Z+1]));
|
||||
|
Reference in New Issue
Block a user