Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8989135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:10:45+00:00 2026-06-15T22:10:45+00:00

In my app I need to draw many placemarks and continuously update their location

  • 0

In my app I need to draw many placemarks and continuously update their location (or delete them if they become old). Now I’m doing it with some cascade and sequential loops, and my fear is that this is not the most efficient way to do it.
Here it is how I do this work up to now:

  1. For each placemark to draw I first search in MapKit annotations array (made by a custom MKPlacemark where I added the creation date and a unique identifier) for the unique id of the placemark to draw. If I find the placemark I update only its location, otherwise I add the new annotation on the map.
  2. For each placemark in the MapKit annotations array, I check if the elapsed time between now and the creation date is greater than 10 seconds and if it is true, I remove that annotation from the map.

I repeat these 2 loops each 2 seconds.

The problem is that when I manage 20 placemarks or more, the loops take too much time and the update-remove process doesn’t work as expected.

Which is the fastest method to work with annotations array? Is it faster removing each annotation and redrawing them all?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:10:47+00:00Added an answer on June 15, 2026 at 10:10 pm

    I solved the problem. I was doing it in the right way. The only remaining problem was the freeze of the screen during map update. For this reason i solved running the update/delete process on another thread.
    This means that when you are ready to update the placemark or to delete it, your background thread needs to call the map update on the main thread (the map must be updated on the main thread).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my app I need to draw a widget contents onto Bitmap. The code(pseudo)
in my app i need to draw lines on map while i am walking,running
We are building a web app library which need draw some polyline/polygon/circle/rectange. Also we
I'm developing an App, and I need to draw borders and separators on a
I am developing a map App in windows phone 7.5 platform. I need draw
I am working in an app in which I need to draw Histogram of
In my App I need to draw graph data with different datamodels that frequently
I have a drawing app where the user can draw lines with their finger,
In my app I need to draw a circle and user can drag it
So I have an APP that loops and continuously draws many png files to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.