Jump to content

Linuxuser1234

Members
  • Content Count

    65
  • Joined

  • Last visited

Community Reputation

1 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Linuxuser1234

    Shapefiles not projecting to TSphere

    @programmerdelphi2k is f needed in MyDataFromFileSHP.Add(F,'tl_2021_01001_roads.shp', 'world-administrative-boundaries.shp'); i tried overload but that didnt work
  2. Linuxuser1234

    Shapefiles not projecting to TSphere

    trying to get shapefiles to display on a TSphere Component in BOLT.pas(UNIT 1/Form1) from GISEngine.pas i tried this function TGISEngine.RenderShp: boolean; begin GISobj.Viewport3D1.Parent := Earth; end; but that doesnt do anything here is the full unit unit GISEngine; //thank you programmerdelphi2k for helping //This unit Displays Shapefiles onto a 3D Globe interface uses System.SysUtils, System.Classes, FMX.Viewport3D, FMX.Objects3D, System.IOUtils, System.Generics.Collections, BOLT; type TGISFilesnamesSHP = TArray<string>; TGISEngine = class private FFilenames : TList<string>; Viewport3D1: TViewport3D; Earth: TSphere; function GetFilename(const i: integer): string; public constructor Create; overload; constructor Create(const AFilenames: TGISFilesnamesSHP); overload; destructor Destroy; override; procedure AddFilenames(const AFilenames: TGISFilesnamesSHP); procedure ClearFilenames; function CountFilenames: integer; function RenderShp: boolean; property Filename[const i: integer]: string read GetFilename; property Filenames: TList<string> read FFilenames; function VerifyIfAllFilesSHPExists(out AErrors: TGISFilesnamesSHP): boolean; function LoadFilenames: boolean; property GISViewport3D: TViewport3D read Viewport3D1 write Viewport3D1; property GISEarth: TSphere read Earth write Earth; end; var GISobj : TGISEngine; Form1: TForm1; implementation { TGISEngine } constructor TGISEngine.Create; begin Viewport3D1 := TViewport3D.Create(nil); Earth := TSphere.Create(nil); FFilenames := TList<string>.Create; end; constructor TGISEngine.Create(const AFilenames: TGISFilesnamesSHP); begin Create; AddFilenames(AFilenames); end; destructor TGISEngine.Destroy; begin FFilenames.Free; Earth.Free; Viewport3D1.Free; inherited; end; function TGISEngine.GetFilename(const i: integer): string; begin result := ''; if (i > -1) and (i < FFilenames.Count) then result := FFilenames.Items[i]; end; procedure TGISEngine.ClearFilenames; begin FFilenames.Clear; end; function TGISEngine.CountFilenames: integer; begin result := FFilenames.Count; end; procedure TGISEngine.AddFilenames(const AFilenames: TGISFilesnamesSHP); var F: string; begin if (Length(AFilenames) > 0 ) then for F in AFilenames do if not FFilenames.Contains(F) then FFilenames.Add(F); end; function TGISEngine.VerifyIfAllFilesSHPExists(out AErrors: TGISFilesnamesSHP): boolean; var F: string; begin result := false; if (FFilenames.Count = 0) then begin AErrors := ['Filenames list is empty']; exit; end; for F in FFilenames do if not FileExists(F) then AErrors := AErrors + [F + ', dont exists!']; end; function TGISEngine.LoadFilenames: boolean; var F: string; begin result := false; if (FFilenames.Count > 0) then begin for F in Filenames do GISobj.AddFilenames(['tl_2021_01001_roads.shp','world-administrative-boundaries.shp']); end; end; function TGISEngine.RenderShp: boolean; begin GISobj.Viewport3D1.Parent := Earth; end; initialization GISobj := TGISEngine.Create; finalization GISobj.Free; end.
  3. Im trying to communicate with a component in Unit1 from Unit4 but when i click on the button i get a access violation error how can i resolve this procedure TForm4.Button1Click(Sender: TObject); var Label21: Tlabel; Button1: Boolean; ProgressBar1 : TProgressBar; begin // ProgressBar1.Visible := True; //Component is in Unit1 (Bolt) end;
  4. @programmerdelphi2ki get this error TComboEdit does not contain GetCound and yes i have tried var
  5. Do you want to add the selected from ComboEdit1 to the dropdown of ComboEdit2? Hook Combo1Edit.OnSelect procedure TForm4.ComboEdit1OnSelect(Sender: TObject); begin ComboEdit2.Items.Add(ComboEdit1.Text); end; This event is called when an item is selected from the dropped down list of ComboEdit1. Naturally, you need to add code to see if the item has already been added before you add it. @Lars Fosdal that doesnt work
  6. Im trying make a procedure that when you select an item from ComboEdit1 (it will officially list items from a ftp site) but for a test im trying to list the same item from ComboEdit1 to ComboEdit2 procedure TForm4.ComboEdit1Click(Sender: TObject); begin end; i have tried %s like ComboEdit2.Items.Add('%S'); but that doesnt work here is the list items for ComboEdit1 and i havent been able to find code examples TTUL TTPA TSTL TSLC TSJU TSDF TRDU TPIT TPHX TPHL TPBI TORD TOKC TMSY TMSP TMKE TMIA TMEM TMDW TMCO TMCI TLVE TLAS TJUA TJFK TIDS TICH TIAH TIAD THOU TFLL TEWR TDTW TDFW TDEN TDCA TDAY TDAL TCVG TCMH TCLT TBWI TBOS TBNA TATL TADW ROP4 ROP3 RODN RKSG RKJK PHWA PHMO PHKM PHKI PGUA PAPD PAKC PAIH PAHG PAEC PACG PABC NOP4 NOP3 KYUX KVWX KVTX KVNX KVBX KVAX KUEX KUDX KTYX KTWX KTLX KTLH KTFX KTBW KSRX KSOX KSJT KSHV KSGF KSFX KRTX KRLX KRIW KRGX KRAX KPUX KPOE KPDT KPBZ KPAH KOTX KOKX KOHX KOAX KNQA KNKX KMXX KMVX KMUX KMTX KMSX KMRX KMQT KMPX KMOB KMLB KMKX KMHX KMBX KMAX KMAF KLZK KLWX KLVX KLTX KLSX KLRX KLOT KLNX KLIX KLGX KLCH KLBB KJKL KJGX KJAX KIWX KIWA KINX KIND KILX KILN KICX KICT KHTX KHPX KHNX KHGX KHDX KGYX KGWX KGSP KGRR KGRK KGRB KGLD KGJX KGGW KFWS KFTG KFSX KFSD KFFC KFDX KFDR KFCX KEYX KEWX KEVX KESX KEPZ KEOX KENX KEMX KEAX KDYX KDVN KDTX KDOX KDMX KDLH KDIX KDGX KDFX KDDC KDAX KCYS KCXX KCRP KCLX KCLE KCCX KCBX KCBW KCAE KBYX KBUF KBRO KBOX KBMX KBLX KBIS KBHX KBGM KBBX KATX KARX KAPX KAMX KAMA KAKQ KABX KABR FOP1 DOP1 DAN1
  7. Linuxuser1234

    How to have a component that follows Mouse Pointer

    @programmerdelphi2k also do you know how to set the TCalloutpanel visibilaty to true when you click on the earth im trying to do this procedure TForm1.Button22Click(Sender: TObject); var Marker : TCalloutPanel; Coord: TLabel; MarkerBool: Boolean; begin if MarkerBool then begin Marker := TCalloutPanel.Create(Self); Marker.Width := 209; Marker.Height := 41; Marker.RotationAngle := 180; Marker.Visible := False; Marker.Parent := Self; Coord := TLabel.Create(Self); Coord.Width := 120; Coord.Visible := False; Coord.Parent := Self; Coord.Height:= 17; Coord.Text := '00.00000 -00.00000'; end else begin Earth.OnClick := Marker.Visible:=True; //<--Code Doesnt work keep getting incompatible types TNotiftEvent and procedure untyped pointer or untyped parameter
  8. Im trying to get TCalloutPanel to follow the mouse pointer but i cant find any code examples on this here is the code i have so far procedure TForm1.Button22Click(Sender: TObject); var Marker : TCalloutPanel; begin // Marker := TCalloutPanel.Create(Self); Marker.Width := 209; Marker.Height := 41; Marker.RotationAngle := 180; Marker.Visible := True; Marker.Parent := Self; end;
  9. im trying to make a button to show a tooltip style popup that hovers over a mouse pointer inside viewport3D using a bitmap image to show actual map coordinates when you click on a area it will show that area in google maps in the viewport how can i do this? here is a example
  10. Linuxuser1234

    How to make a starmap skybox like google earth

    Im trying to make a starmap skybox in the viewport 3d background similar to what google earth does
  11. @programmerdelphi2k that still wont work same error
  12. Keep getting Expected and identifier but received VAR same for IN and Contains procedure TGISEngine.AddFilenames(const AFilenames: TGISFilesnamesSHP); begin if (Length(AFilenames) > 0 ) then begin for var in AFilenames do if not FFilenames.Contains(F) then FFilenames.Add(F); end; end;
  13. Linuxuser1234

    Hoiw to visualize GRIB2 Files

    @ptlycldy im trying download the GRIB2 Data and then display the data onto the sphere something like this
  14. Linuxuser1234

    Using a component from one unit to other units

    @programmerdelphi2k can i pm you the file
×