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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:48:11+00:00 2026-05-27T21:48:11+00:00

I use the following code to display a map center on the user’s location:

  • 0

I use the following code to display a map center on the user’s location:

...
// start off by default current position
AppManager *appManager = [AppManager sharedManager];
MKCoordinateRegion newRegion;
newRegion.center.latitude = [appManager.currentlatitude floatValue];
newRegion.center.longitude = [appManager.currentlongitude floatValue];
newRegion.span.latitudeDelta = 0.06;
newRegion.span.longitudeDelta = 0.06;
[self.mapView setRegion:newRegion animated:YES];
[self.view insertSubview:mapView atIndex:0];
...

The thing is, I do not manage to decrease the zoom level enough when playing with “newRegion.span.latitudeDelta” and “newRegion.span.longitudeDelta” values. The zoom only show a zone of something like 30 kms wide when I’d like to have several hundreds.

For what I saw, a value of 0.06 for longitudeDelta should show 180 degre (half of the earth) (for a latitude 0), then for a latitude of 43, I think I should see more than 30 km.

Any idea ?

  • 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-27T21:48:12+00:00Added an answer on May 27, 2026 at 9:48 pm

    The latitudeDelta and longitudeDelta are in degrees so a value of 0.06 is a relatively small distance in km. To show “half of the Earth”, you’d have to set the longitudeDelta to 180.0.

    If you know the distance (eg. in km) you want to show, it will be easier to use the MKCoordinateRegionMakeWithDistance function instead of trying to do the conversion yourself:

    CLLocationCoordinate2D newCenter = 
        CLLocationCoordinate2DMake([appManager.currentlatitude floatValue], 
                                   [appManager.currentlongitude floatValue]);
    
    MKCoordinateRegion newRegion = 
        MKCoordinateRegionMakeWithDistance(newCenter, 200000, 200000);
    

    The last two parameters are latitudinalMeters and longitudinalMeters so the above example sets the span to 200 km x 200 km.

    Remember the map view will then adjust the region as needed based on the map view’s proportions and displayable zoom level.

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

Sidebar

Related Questions

I am trying to use the following code, to display $formcode, which is the
I am trying to use the following javascript code to alert the user when
I use the following code to delete a character when the user presses the
I have use following code to display category and there product on click patent
I use the following code to display a product. 3 products per row (each
I use the following code to display a tooltip <asp:GridView ID=GridView1 runat=server AutoGenerateColumns=False DataKeyNames=ID
I use the following code to display list of contacts, and then retrieve contact
I use the following code to display the time of blog posts on my
On IE Quirks mode , I want to use following code to display some
I use the following code to display xml as a treeview. Now 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.