Created
May 2, 2021 20:08
-
-
Save DelphiWorlds/2e65ad9998a017351778ad2f321fdbd1 to your computer and use it in GitHub Desktop.
Create 2 markers, not far from each other
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
TForm1 = class(TForm) | |
Map: TMapView; | |
private | |
FMarkerA: TMapMarker; | |
FMarkerB: TMapMarker; | |
procedure AddMarkers; | |
public | |
constructor Create(AOwner: TComponent); override; | |
end; | |
var | |
Form1: TForm1; | |
implementation | |
{$R *.fmx} | |
constructor TForm1.Create(AOwner: TComponent); | |
begin | |
inherited; | |
AddMarkers; | |
end; | |
procedure TForm1.AddMarkers; | |
var | |
LDescriptor: TMapMarkerDescriptor; | |
begin | |
Map.Location := TMapCoordinate.Create(30.3970, -97.7300); | |
LDescriptor := TMapMarkerDescriptor.Create(Map.Location, 'EMBT'); | |
FMarkerA := Map.AddMarker(LDescriptor); | |
Map.Location := TMapCoordinate.Create(30.3966, -97.7275); | |
LDescriptor := TMapMarkerDescriptor.Create(Map.Location, 'Near EMBT'); | |
FMarkerB := Map.AddMarker(LDescriptor); | |
Map.Zoom := 18; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are interessed to see the effect I describe, you can download GaletPocket on the App Store, and write "Dijon" in the search bar. I can give you access to the source code too. Thanks