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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:28:30+00:00 2026-05-17T02:28:30+00:00

I read the current location’s latitude and longitude values and then pin that location

  • 0

I read the current location’s latitude and longitude values and then pin that location in iPhone successfully. Now I want to read that place name using this latitude and longitude values.

I used the following code to read the find the current location:

- (void)mapView:(MKMapView *)mapView1 didUpdateUserLocation:(MKUserLocation *)userLocation{

    CLLocation *whereIAm = userLocation.location;

    NSLog(@"I'm at %@", whereIAm.description);

    latitude = whereIAm.coordinate.latitude;
    longitude = whereIAm.coordinate.longitude;

    NSLog(@"LAT : %f",latitude);
    NSLog(@"LONG : %f",longitude);

    mapView.mapType=MKMapTypeStandard;
    [mapView setMapType:MKMapTypeStandard];
    [mapView setZoomEnabled:YES];
    [mapView setScrollEnabled:YES];

    MKCoordinateRegion region = { {0.0, 0.0 }, { 0.0, 0.0 } }; 
    region.center.latitude =latitude;  //22.569722 ;
    region.center.longitude = longitude;  //88.369722;
    region.span.longitudeDelta = 0.01f;
    region.span.latitudeDelta = 0.01f;
    [mapView setRegion:region animated:YES]; 

    [mapView setDelegate:self];

    DisplayMap *ann = [[DisplayMap alloc] init]; 
    ann.title = @" Welcome";
    ann.subtitle = @"Hi"; 
    ann.coordinate = region.center; 
   [mapView addAnnotation:ann];   
}


- (void)viewDidLoad {
      [super viewDidLoad];

      mapView.showsUserLocation = YES;
      mapView.delegate = self;
   }



-(MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation: (id<MKAnnotation>)annotation {
   MKPinAnnotationView *pinView = nil; 
   if(annotation != mapView.userLocation) 
   {
    static NSString *defaultPinID = @"com.invasivecode.pin";
    pinView = (MKPinAnnotationView *)[mapView       dequeueReusableAnnotationViewWithIdentifier:defaultPinID];
   }     
   [mapView.userLocation setTitle:@"I am here"];
   return pinView;        
 }
  • 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-17T02:28:31+00:00Added an answer on May 17, 2026 at 2:28 am

    Use the MKReverseGeocoderDelegate Protocol like this :

    @interface YourViewController : UIViewController <MKReverseGeocoderDelegate> 
    {
    }
    
    
    @implementation YourViewController
    
    - (void)mapView:(MKMapView *)mapView1 didUpdateUserLocation:(MKUserLocation *)userLocation{
         CLLocation *whereIAm = userLocation.location;
         MKReverseGeocoder *reverseGeocoder = [[MKReverseGeocoder alloc] initWithCoordinate:whereIAm.coordinate];
         reverseGeocoder.delegate = self;
         [reverseGeocoder start];
    }
    

    Now implement the following method delegate to get the response :

    - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark {
          NSLog(@"I'm at %@", placemark.locality);
    }
    

    For more informations look at this : http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKReverseGeocoder_Class/

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

Sidebar

Related Questions

I want to read my current location using Map view in my iPhone application.
I read that the servlets map the current location based on the url. Clicking
I read that with .NET Framework 4 the current garbage collection implementation is replaced:
I want to read the registry to find the current PowerPoint version. However this
I've read that the C# version is as follows: Application.Current.Dispatcher.Invoke( DispatcherPriority.Background, new Action(delegate {
I have a need to store the current location to 'disk' on the iphone
I'm thinking about creating a location-aware iPhone app that could work offline by coming
I have a User entity that has a Current Location field (city and country).
I'm working on a tool that will find the closest latitude/longitude position from a
i try to get the current zip code from the longitude and latitude which

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.