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

  • Home
  • SEARCH
  • 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 8076061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:11:04+00:00 2026-06-05T15:11:04+00:00

in my app I’m adding and removing annotations to my map view, but actually

  • 0

in my app I’m adding and removing annotations to my map view, but actually even if I first add the new ones and then remove the old ones there is a blink of the annotations

The new annotations are received from the internet and so I can’t just remove them from the array of the new ones…

My question is how does it come to the blink behavior and how I can avoid this?

I don’t want to iterate through the annotations and compare each’s location…
So I tried to delay the remove and ended up at 0.2 seconds. With exactly this delay there is no visible blink, but this isn’t desirable at all.

Thanks

    NSMutableArray *annotationsToRemove = [[NSMutableArray alloc] initWithArray:[_mapView annotations]]; 
    [annotationsToRemove removeObject:[_mapView userLocation]];
    [_mapView addAnnotations:locations];
    // [_mapView performSelector:@selector(removeAnnotations:) withObject:annotationsToRemove afterDelay:0.2];
    [_mapView removeAnnotations:annotationsToRemove];

(“locations” is my array of new annotations)

  • 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-05T15:11:05+00:00Added an answer on June 5, 2026 at 3:11 pm

    The blink always happens when adding an annotation just after removing one. If you have control of the web service, add a unique id, check if an annotation with that id already exists on your map and only add a new annotation if it doesn’t. If you can’t add an id, check using the latitude and longitude (which should probably be unique). Iterating through them won’t be expensive.

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

Sidebar

Related Questions

The app in question is already localized into a few languages, but I'm adding
App.config: <add key=SaveDraftPath value=C:\Drafts\/> C#: var saveDraftPath = ConfigurationManager.AppSettings[SaveDraftPath]; var sfDialog = new SaveFileDialog();
App reads JSON data. Then it would put it to whe listview (correctly) but
app.rb: require 'sinatra' class MyApp < Sinatra::Application enable :sessions if session[:user_id].nil? then erb :login
My app crashes when I try to launch a new activity. The stack trace
The app I'm working on is relatively simple but it is throwing memory warnings.
My app uses the android.support.v4.view.ViewPager class. For each page in the ViewPager, I want
App runs on simulator on my MacBook Air, but not on iMac. I have
My app runs fine in the ios 4.3 simulator, but not the ios 5
My app is fixed to landscape mode, yet during viewDidLoad() and even viewWillAppear(), the

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.