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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:47:35+00:00 2026-06-12T00:47:35+00:00

How could you get thumbnail from mapView as shown on in the red rectangle

  • 0

How could you get thumbnail from mapView as shown on in the red rectangle box the figure below.enter image description here

UIView *thumbnailContainer=[[UIView alloc]initWithFrame:CGRectMake(10,10,64,64)];
    thumbnailContainer.clipsToBounds=YES;
    thumbnailContainer.layer.borderColor=[UIColor colorWithWhite:0 alpha:0.5].CGColor;
    thumbnailContainer.layer.cornerRadius=3;
    thumbnailContainer.layer.borderWidth=1;

    Annotation *annotation1=[[Annotation alloc]init];
    annotation1.coordinate = CLLocationCoordinate2DMake(29.7189214,-95.33916);
    annotation1.title = @"University of Houston";
    annotation1.subtitle = @"4800 Calhoun Rd,Houston";
    MKMapView *mapView2=[[MKMapView alloc]initWithFrame:CGRectMake(0, 0, 150, 150)];
    mapView2.userInteractionEnabled=NO;
    mapView2.centerCoordinate=[annotation1 coordinate];
    [mapView2 addAnnotation:annotation1];
    //annPoint=[self.mapView convertCoordinate:annotation1.coordinate toPointToView:self.mapView];

    MKCoordinateRegion region=MKCoordinateRegionMakeWithDistance(mapView2.centerCoordinate, 150, 150);
    mapView2.region=region;
    mapView2.transform=CGAffineTransformMakeScale(0.75, 0.75);
    mapView2.layer.position=CGPointMake(thumbnailContainer.bounds.size.width/2,thumbnailContainer.bounds.size.height/2+10);
    [thumbnailContainer addSubview:mapView2];
  • 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-12T00:47:36+00:00Added an answer on June 12, 2026 at 12:47 am

    What about using a scaled down map view? I don’t think than creating a thumbnail image from the rendered layer of a map view would be a good solution, as it would require to load the map at the desired zoom first, and then, why not displaying directly this map instead of making an image out of it? 😀 This is the code I would use.

        Annotation *yourAnnotation = [[Annotation alloc] init];
    
    UIView *thumbnailContainer = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 64, 64)];
    thumbnailContainer.clipsToBounds = YES;
    thumbnailContainer.layer.borderColor = [UIColor colorWithWhite:0 alpha:0.5].CGColor;
    thumbnailContainer.layer.cornerRadius = 3;
    thumbnailContainer.layer.borderWidth = 1;
    
    MKMapView *thumbnailMap = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, 150, 150)];
    thumbnailMap.userInteractionEnabled = NO;
    thumbnailMap.centerCoordinate = [yourAnnotation coordinate];
    [thumbnailMap addAnnotation:yourAnnotation];
    
    MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(thumbnailMap.centerCoordinate, 150, 150);
    thumbnailMap.region = region;
    thumbnailMap.transform = CGAffineTransformMakeScale(0.75, 0.75);
    //we add 10 pixels on the y coordinate, to center the pin in the view. Moreover it will hide the "legal" label of the map view.
    thumbnailMap.layer.position = CGPointMake(thumbnailContainer.bounds.size.width / 2, thumbnailContainer.bounds.size.height / 2 + 10);
    [thumbnailContainer addSubview:thumbnailMap];
    

    It looks like that: enter image description here

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

Sidebar

Related Questions

How could I use imagegrabscreen to get a thumbnail image and a full size
I could get the handle to the google text doc i needed. I am
I could get the keyboard to work but on a UITextView but some how
Wondering if I could get some advice and direction on this following requirement: Need
Was hoping I could get a bit of a hand on this login that
Is there a way I could get which layout being used on a certain
In a controller in CI you could get all post variables by doing something
I was under the impression that I could get the value of a select
I was wondering if i could get some help. What i am trying to
hi im doing a loop so i could get dict of data, but since

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.