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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:54:42+00:00 2026-06-15T02:54:42+00:00

I have a mkmapview that i create at run time. First i have to

  • 0

I have a mkmapview that i create at run time. First i have to tell that my actual problem is on the ipad but not on the simulator. On view did load i am calling two functions. fillValues and setDraggable Point.

CLLocationManager *locManager = [[CLLocationManager alloc]init];
[locManager startUpdatingLocation];

CLLocationCoordinate2D currCoordinates = locManager.location.coordinate;
NSLog(@"the latitude is %f",currCoordinates.latitude);
NSLog(@"the longitude is %f",currCoordinates.longitude);
[self fillLatitudeAndLongitudeTextFields:currCoordinates.latitude longitudeValue:currCoordinates.longitude];

[self setDraggablePinOnMap:currCoordinates];

ON SIMULATOR:
logs the coordinates and fillTextfields and sets the draggable point on the map.The setDraggablePinOnMap method creates the map and sets the red annotation. So when the app loads on simulator it shows blue dot around my location and a red pin in the same location (Works as intended). I move the pin and get the coordinates of that location and update the textfields.

ON the device-iPAD
First time i load up the app it loads up with my current location with a blue dot. But the red annotation instead of showing up at my current location it shows up at 0,0,0 and 0,0,0 at the center of earth on the equator. It is not doing as it was intended.Both the red and blue should intersect at the same point. Interesting point is on the second time load of this screen(basically i go back to screen A and come back to this screen.Lets say the screen where map is present as screen B) it loads the map with blue and red points intersecting. It is not able to do it only on the first time.Its like it was not able to figure out the location on the first load but can do it afterwards. How can I make it to show on the first load? Do i make sense?Please ask me if you need more information.

  • 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-15T02:54:43+00:00Added an answer on June 15, 2026 at 2:54 am

    It’s not able to do it the first time because you haven’t waited for the location manager to get a proper fix on your location. You need to make you class the location manager’s delegate and wait for a didUpdateLocations callback. Once you get a location you can use it to set your red pin and then stop the location manager from sending you updates, or just ignore them if the pin has already been placed.

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

Sidebar

Related Questions

I have a label that overlays on an MKMapView . The only problem is,
I have a view that I am using as an overlay on a MKMapView
I have a view controller with an MKMapView that calls [self.mapView setRegion:region animated:YES]; which
Here I create one project that will track our current location. But I have
I have a MKMapView annotation object that has a right callout accessory detail disclosure
As well as my question Removing MKMapView Annotations causes leaks. I have discovered that
I want to have a MKMapView with an two different overlays. First, I have
I am new to Android development and I have a problem that I have
I have a project that worked for months, but I updated the ADT Plugin
I have a created a custom class that extends from MKMapView and i want

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.