I don’t have any problem with TMapView on Android, but on iOS I didn’t see the user location or (my position).
The code is the same as in Android, but I move the code to show user location into a external method to test :
procedure TfrmMain.imgLogoClick(Sender: TObject);
MapView.ControlOptions := MapView.ControlOptions + [TMapControlOption.MyLocation];
MapView.LayerOptions := MapView.LayerOptions + [TMapLayerOption.UserLocation];
When the code is executed, I got a exception :
Project MapProject raise a class exception EAccessViolation with message ”.
On Android I run this code withtout any problem in FormShow.
When I open the app on iOS it ask me to autorize to use the user location because I have a TLocationSensor active on the show, I answer with "always".
Below, what I have with the LocationSensor :
procedure TfrmMain.LocationSensorLocationChanged(Sender: TObject;
const OldLocation, NewLocation: TLocationCoord2D);
MapView.Location := TMapCoordinate.Create(NewLocation.Latitude, NewLocation.Longitude);
Any idea how to show the current user location ? Thanks