I have placed a FMXGmaps component on mp form and deployed to my android device Fine.
Know Im trying to get it to default to my current location.
The Loc Sensor is turned on on formshow.
The Lat = -26.744.. Long= 150.63
which is Chinchilla Queensland but the map loads up with brisbane. Lat -27.4522751 long 153.0353622
If I set Defaulttocurrentlocation to false it loads up paris.
My markers are getting placed in the correct place.
MapPanTo does nothing.
What am I doing wrong.
procedure TForm1.LocSensorLocationChanged(Sender: TObject;
const OldLocation, NewLocation: TLocationCoord2D);
begin
TMSFMXEdit1.Text := 'Latitude: ' + NewLocation.Latitude.ToString;
TMSFMXEdit2.Text := 'Longitude: ' + NewLocation.Longitude.ToString;
if LocSensor.Active then
begin
GetGeoAddress.Latitude := NewLocation.Latitude;
GetGeoAddress.Longitude := NewLocation.Longitude;
if GetGeoAddress.LaunchReverseGeocoding = erOk then
EditPostCode.Text := GetGeoAddress.ResultAddress.PostalCode;
Map.Markers[0].Latitude := NewLocation.Latitude;
Map.Markers[0].Longitude := NewLocation.Longitude;
Map.Markers[1].Latitude := NewLocation.Latitude;
Map.Markers[1].Longitude := NewLocation.Longitude;
Map.CurrentLocation.Latitude := NewLocation.Latitude;
Map.CurrentLocation.Longitude := NewLocation.Longitude;
Map.Enabled := True;
end;
end;