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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:40:12+00:00 2026-06-14T15:40:12+00:00

I am trying to add some annotations to my mkMapView in this loop: for

  • 0

I am trying to add some annotations to my mkMapView in this loop:

for (PFObject *fetchedCompany in companyArray)
{
       Store *store = [[Store alloc] initWithObject:fetchedCompany];
       [self loadStore:store];
       [store release];
}

- (void) loadStore:(Store *) store {
    CLLocationCoordinate2D location = [self getLocationFromAddressString:store.address];
    MapViewAnnotation *mapAnnotation = [[MapViewAnnotation alloc] initWithTitle:store.name coordinate:location];
    [self.indexMapView addAnnotation:mapAnnotation];
}

And this the getLocationFromAddressString method that convert the address to a location using google api:

-(CLLocationCoordinate2D) getLocationFromAddressString:(NSString*) addressStr {
    NSString *urlStr = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%@&output=csv", [addressStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];

    NSError *error = nil;

    NSString *locationStr = [NSString stringWithContentsOfURL:[NSURL URLWithString:urlStr] encoding:NSUTF8StringEncoding error:&error];

    NSArray *items = [locationStr componentsSeparatedByString:@","];

    double lat = 0.0;
    double lon = 0.0;

    if([items count] >= 4 && [[items objectAtIndex:0] isEqualToString:@"200"]) {
        lat = [[items objectAtIndex:2] doubleValue];
        lon = [[items objectAtIndex:3] doubleValue];
    }
    else {
        NSLog(@"Address, %@ not found: Error %@",addressStr, [items objectAtIndex:0]);
    }

    CLLocationCoordinate2D location;
    location.latitude = lat;
    location.longitude = lon;

    return location;
}

When I send just one location always it works perfectly, but when I add annotations in my loop sometimes some locations could not be recognized and I got the error from my NSLog:

Address, Vallgatan 3 GÖTEBORG not found: Error 620

The thing is I am pretty sure about the addresses because when I tried them without loop they worked. Do you know how can I solve the problem?

  • 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-14T15:40:13+00:00Added an answer on June 14, 2026 at 3:40 pm

    You’ve submitted too many queries and your request got rejected. See Geocoding API V2 docs.

    620:    G_GEO_TOO_MANY_QUERIES
    

    “The given key has gone over the requests limit in the 24 hour period or has submitted too many requests in too short a period of time. If you’re sending multiple requests in parallel or in a tight loop, use a timer or pause in your code to make sure you don’t send the requests too quickly”

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

Sidebar

Related Questions

I am trying to add some logic in this. But I am not sure
I'm trying to add some annotations to classes while they are loaded. For that
Im trying to add some short file names to a Wise installer to fix
I am trying to add some error detection to a script that is used
I was trying to add some non-production test code by creating a 3rd partial
I am trying to add some WebAPI support to my asp.net 4 RC site,
I'm trying to add some functionality to dunst, a small notification system. I've never
I'm trying to add some navigation controller in my app, it's sth likes: in
I am trying to add some views programatically to a linear layout which is
I am trying to add some functionality to json processing for some nodes. So

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.