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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:37:39+00:00 2026-06-15T16:37:39+00:00

Good day everybody! I’m developing application for iPhone. I have table view and list

  • 0

Good day everybody!

I’m developing application for iPhone. I have table view and list of locations that I need to display to user. For this purpose I used MKMapView in every table view cell. But when there are a lot of locations this solution becomes very slow. I want to improve UI performance and replace MKMapView with UIImageView. So I need to render map from MKMapView to UIImage in some NON-MAIN thread. I tried to do it like this:

UIGraphicsBeginImageContext(CGSizeMake(64, 64));
CGContextRef context = UIGraphicsGetCurrentContext();
[[mapView layer] renderInContext:context];
thumbnail_image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

But this code renders only yellow background of the map and pin above specified location. There is no map data such streets, houses, etc. What did I do wrong? Thank You for advice.

  • 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-15T16:37:40+00:00Added an answer on June 15, 2026 at 4:37 pm

    The reason that you aren’t getting any map data is that you aren’t waiting for the map data to load. Wait until the map view’s mapViewDidFinishLoadingMap: delegate method is called, then take the picture. You might have to take the picture after a small delay, one or two seconds, after the delegate method is called, as I have found that sometimes the delegate method is called a bit early as I mention in this question.

    - (void)mapViewDidFinishLoadingMap:(MKMapView*)mapView {
        double delayInSeconds = 2.0;
        dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
        dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
            UIGraphicsBeginImageContext(CGSizeMake(64, 64));
            CGContextRef context = UIGraphicsGetCurrentContext();
            [mapView.layer renderInContext:context];
            thumbnail_image = UIGraphicsGetImageFromCurrentImageContext();
            UIGraphicsEndImageContext();
        });
    }
    

    Note: You’ll want to make the dimensions of your map view square so that when you render it in a square image it won’t be stretched awkwardly.

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

Sidebar

Related Questions

Good day everybody, I'm having troubles with the display of a data that does
Good day, I have a class that implements the LoaderCallbacks, and hence have the
Good day I have a custom TextBox that has a IndicatorTextBox.ui.xml file as well
Good day, I have like 15 images I need to be buttons. I have
Good Day, I have a simple working routine in Perl that swaps two words:
Good day, In SQL Server 2005, I have a table numerous columns, including a
Good day, I have found a strange quirk in Vim that I can't explain
Good Day, We have migrated our web application to ASP.NET 2.0 from ASP.NET 1.1.
Good day. I have developed an application which works successfully on my local machine
Good day, everyone! I have here a program that sorts 50,000 words from a

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.