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.
migrossAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sinisa VukSoftware architectCommented:
Think, fMarkers.Clear will be enough for clearing.
Read this article... it describe how to add marker from code... and this one too (not in English, use Translator for text, but code is readable..)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
migrossAuthor Commented:
I changed to TMSMKMapview, where the Annotations (Markers) work as they should. But thanks for your help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.