You've already forked lazarus-ccr
LazMapViewer: Fix issue with marker disappearing at small zoom when the window is wider than the full map. Patch by Ekkehard Domning. Prevent POIImage exception in the fulldemo_with_addons. Show "Cyclic view" checkbox in fulldemo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8815 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -378,7 +378,6 @@ end;
|
||||
procedure TMainForm.CbCyclicChange(Sender: TObject);
|
||||
begin
|
||||
MapView.Cyclic := CbCyclic.Checked;
|
||||
MapView.Redraw;
|
||||
end;
|
||||
|
||||
procedure TMainForm.ClearFoundLocations;
|
||||
@ -394,16 +393,27 @@ begin
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormCreate(Sender: TObject);
|
||||
var
|
||||
fn: String;
|
||||
begin
|
||||
// FMapMarker := CreateMapMarker(32, clRed, clBlack);
|
||||
POIImage := TPortableNetworkGraphic.Create;
|
||||
POIImage.PixelFormat := pf32bit;
|
||||
POIImage.LoadFromFile('mapmarker.png');
|
||||
cInputQueryEditSizePercents := 0;
|
||||
|
||||
fn := Application.Location + 'mapmarker.png';
|
||||
if not FileExists(fn) then
|
||||
MessageDlg('Copy the file "mapmarker.png" from the source folder to the folder with the executable.',
|
||||
mtError, [mbOK], 0)
|
||||
else
|
||||
begin
|
||||
// FMapMarker := CreateMapMarker(32, clRed, clBlack);
|
||||
POIImage := TPortableNetworkGraphic.Create;
|
||||
POIImage.PixelFormat := pf32bit;
|
||||
POIImage.LoadFromFile(fn);
|
||||
end;
|
||||
|
||||
ForceDirectories(HOMEDIR + 'cache/');
|
||||
MapView.CachePath := HOMEDIR + 'cache/';
|
||||
MapView.GetMapProviders(CbProviders.Items);
|
||||
CbProviders.ItemIndex := CbProviders.Items.Indexof(MapView.MapProvider);
|
||||
CbProviders.ItemIndex := CbProviders.Items.IndexOf(MapView.MapProvider);
|
||||
MapView.DoubleBuffered := true;
|
||||
MapView.Zoom := 1;
|
||||
CbZoomToCursor.Checked := MapView.ZoomToCursor;
|
||||
|
Reference in New Issue
Block a user