migross
asked on
Deleting tMapmarker in tMapview and Center the map
Hi,
I have a tMapview in DX10 and I have set some tMapmarker on the Map (Apple Map Kit). Now I want to remove them and set new markers.
I found an expample like this:
var
fMarkers:tList<tMapMarker> ;
procedure ClearMarkers;
begin
for Marker in fMarkers do begin
Marker.Remove;
end;
fMarkers.Clear;
end;
This works, but after that I cannot set new markers. Any new Marker ist not visible then. I'm setting the markers on a Locationsensor. Location Changed-Event, because the markers could have moved meanwhile, too.
My second Problem, I want MyLocation always Centered in the map. I use bearing for the heading. I thought setting the map.location would be enough to center the map, but it doesn't seem to be. I still can run out the visible map.
I have a tMapview in DX10 and I have set some tMapmarker on the Map (Apple Map Kit). Now I want to remove them and set new markers.
I found an expample like this:
var
fMarkers:tList<tMapMarker>
procedure ClearMarkers;
begin
for Marker in fMarkers do begin
Marker.Remove;
end;
fMarkers.Clear;
end;
This works, but after that I cannot set new markers. Any new Marker ist not visible then. I'm setting the markers on a Locationsensor. Location Changed-Event, because the markers could have moved meanwhile, too.
My second Problem, I want MyLocation always Centered in the map. I use bearing for the heading. I thought setting the map.location would be enough to center the map, but it doesn't seem to be. I still can run out the visible map.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER