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 918979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:28:01+00:00 2026-05-15T18:28:01+00:00

i have a mapView with pins on it, and the following code for CLLocation

  • 0

i have a mapView with pins on it, and the following code for CLLocation and getDistance between me and another points on the map:

    - (void)locationManager:(CLLocationManager *)manager
    didUpdateToLocation:(CLLocation *)newLocation
           fromLocation:(CLLocation *)oldLocation{

 Koordinate *kunde = [[Koordinate alloc] init];
 kundenPoints = [[NSMutableArray array] retain];

 for(int i = 0; i<[eventPoints count]; i++){
  kunde = [eventPoints objectAtIndex:i];
  CLLocation *userLoc = [[CLLocation alloc] initWithLatitude:kunde.latitude longitude:kunde.longtitude];
  double distance = [newLocation getDistanceFrom:userLoc] / 1000;
  if(distance <= 100){
   [kundenPoints addObject:kunde];
  }else {
  }
 }
 [mapView addAnnotations:kundenPoints];
}

but how can i implement a method that refreshes the map when i tab on a button?
that i always get the pins around me when i want.
the button is not the problem, only the refresh!

i hope someone could help me??

best regards
Marco

  • 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-05-15T18:28:02+00:00Added an answer on May 15, 2026 at 6:28 pm

    as far as I know there is no such a thing as removeAllAnnotations, at least not in iOS4 SDK… although you can quickly fix it using

    NSArray *ants = [mapView_ annotations];
    [mapView_ removeAnnotations:ants];
    

    same goes for overlays

    NSArray *ants = [mapView_ overlays];
    [mapView_ removeOverlays:ants];
    

    so far is the best way I’ve found to do it.

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

Sidebar

Related Questions

I am working with the mapview in AppKit. I have a map with pins
I have 5 pins added to a map. How can I tell the MapView
I have an app that has a mapview, and it shows 20 pins (from
HI, I have a Mapview with some marker points + a marker for current
I have a simple mapview that has the following viewdidload method and didupdate to
i have a scroll view which represents a map, it has pins on it,
I have an app at the moment which shows various pins on a map.
I have a Mapview in my Titanium project. I can get the map to
I have a map view with pins annotations into it. I need to pass
I have this code where I do this as soon as the map loads

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.