Link to home
Start Free TrialLog in
Avatar of migross
migrossFlag for Germany

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.
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of migross

ASKER

I changed to TMSMKMapview, where the Annotations (Markers) work as they should. But thanks for your help.