You've already forked lazarus-ccr
lazMapViewer: Cosmetic changes
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6313 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -18,7 +18,7 @@ object MainForm: TMainForm
|
|||||||
Align = alRight
|
Align = alRight
|
||||||
ClientHeight = 545
|
ClientHeight = 545
|
||||||
ClientWidth = 237
|
ClientWidth = 237
|
||||||
TabOrder = 0
|
TabOrder = 1
|
||||||
object CbProviders: TComboBox
|
object CbProviders: TComboBox
|
||||||
AnchorSideLeft.Control = LblProviders
|
AnchorSideLeft.Control = LblProviders
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
@ -197,8 +197,6 @@ begin
|
|||||||
MapView.Zoom := 1;
|
MapView.Zoom := 1;
|
||||||
CbUseThreads.Checked := MapView.UseThreads;
|
CbUseThreads.Checked := MapView.UseThreads;
|
||||||
CbDoubleBuffer.Checked := MapView.DoubleBuffered;
|
CbDoubleBuffer.Checked := MapView.DoubleBuffered;
|
||||||
// GeoNames.LocationName := 'New York';
|
|
||||||
// MapView.Center := GeoNames.Search('New York', MapView.DownloadEngine);
|
|
||||||
|
|
||||||
ReadFromIni;
|
ReadFromIni;
|
||||||
end;
|
end;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -49,17 +49,19 @@ Type
|
|||||||
FGetZStr: Array of TGetValStr;
|
FGetZStr: Array of TGetValStr;
|
||||||
FMinZoom: Array of integer;
|
FMinZoom: Array of integer;
|
||||||
FMaxZoom: Array of integer;
|
FMaxZoom: Array of integer;
|
||||||
function getLayerCount: integer;
|
function GetLayerCount: integer;
|
||||||
procedure SetLayer(AValue: integer);
|
procedure SetLayer(AValue: integer);
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(aName : String);
|
constructor Create(AName: String);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure AddURL(Url: String; NbSvr: integer;aMinZoom : integer;aMaxZoom : integer; GetSvrStr: TGetSvrStr; GetXStr: TGetValStr; GetYStr: TGetValStr; GetZStr: TGetValStr);
|
procedure AddURL(Url: String; NbSvr, aMinZoom, aMaxZoom: integer;
|
||||||
procedure GetZoomInfos(out zMin:integer;out zMax : integer);
|
GetSvrStr: TGetSvrStr; GetXStr: TGetValStr; GetYStr: TGetValStr;
|
||||||
|
GetZStr: TGetValStr);
|
||||||
|
procedure GetZoomInfos(out AZoomMin, AZoomMax: integer);
|
||||||
Function GetUrlForTile(id: TTileId): String;
|
Function GetUrlForTile(id: TTileId): String;
|
||||||
property Name: String read FName;
|
property Name: String read FName;
|
||||||
property LayerCount : integer read getLayerCount;
|
property LayerCount: integer read GetLayerCount;
|
||||||
property Layer: integer read FLayer write SetLayer;
|
property Layer: integer read FLayer write SetLayer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -131,29 +133,30 @@ begin
|
|||||||
FLayer:=low(FUrl);
|
FLayer:=low(FUrl);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMapProvider.GetZoomInfos(out zMin: integer; out zMax: integer);
|
procedure TMapProvider.GetZoomInfos(out AZoomMin, AZoomMax: integer);
|
||||||
begin
|
begin
|
||||||
zMin:=FMinZoom[layer];
|
AZoomMin := FMinZoom[layer];
|
||||||
zMax:=FMaxZoom[layer];
|
AZoomMax := FMaxZoom[layer];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMapProvider.GetUrlForTile(id: TTileId): String;
|
function TMapProvider.GetUrlForTile(id: TTileId): String;
|
||||||
var i : integer;
|
var
|
||||||
|
i: integer;
|
||||||
XVal, yVal, zVal, SvrVal: String;
|
XVal, yVal, zVal, SvrVal: String;
|
||||||
idsvr: integer;
|
idsvr: integer;
|
||||||
begin
|
begin
|
||||||
Result := '';
|
Result := '';
|
||||||
i := layer;
|
i := layer;
|
||||||
if (i>high(idServer)) or (i<low(idServer)) or (FNbSvr[i]=0) then
|
if (i > High(idServer)) or (i < Low(idServer)) or (FNbSvr[i] = 0) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
idsvr := idServer[i] mod FNbSvr[i];
|
idsvr := idServer[i] mod FNbSvr[i];
|
||||||
idServer[i] += 1;
|
idServer[i] += 1;
|
||||||
|
|
||||||
SvrVal:=inttostr(idsvr);
|
SvrVal := IntToStr(idsvr);
|
||||||
XVal:=inttostr(id.X);
|
XVal := IntToStr(id.X);
|
||||||
YVal:=inttostr(id.Y);
|
YVal := IntToStr(id.Y);
|
||||||
ZVal:=inttostr(id.Z);
|
ZVal := IntToStr(id.Z);
|
||||||
if Assigned(FGetSvrStr[i]) then
|
if Assigned(FGetSvrStr[i]) then
|
||||||
SvrVal := FGetSvrStr[i](idsvr);
|
SvrVal := FGetSvrStr[i](idsvr);
|
||||||
if Assigned(FGetXStr[i]) then
|
if Assigned(FGetXStr[i]) then
|
||||||
|
Reference in New Issue
Block a user