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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:19:42+00:00 2026-06-18T05:19:42+00:00

Currently I am using the following code to get the minimum and maximum latitude

  • 0

Currently I am using the following code to get the minimum and maximum latitude and longitude from a (Google Maps) MapView object.

GeoPoint center = map.getMapCenter();
Double minLat = (center.getLatitudeE6() - (map.getLatitudeSpan() / 2)) / 1E6;
Double minLong = (center.getLongitudeE6() - (map.getLongitudeSpan() / 2)) / 1E6;
Double maxLat = (center.getLatitudeE6() + (map.getLatitudeSpan() / 2)) / 1E6;
Double maxLong = (center.getLongitudeE6() + (map.getLongitudeSpan() / 2)) / 1E6;

Unfortunately, this is not giving me a correct output. I am currently at zoom level 18 in the MapView, centred on the point (52.9476, -1.1452). The output of the above code gives the values (52.947632, -181.145156, 52.947632, 178.854844) respectively. Obviously there is an issue here in that the minimum latitude shown is a physical impossibility, and the latitudes are both exactly the same as the centre latitude. I can confirm that the MapView itself is showing the location correctly.

Can anyone explain why this is happening? Of all the solutions to this issue I have seen, this is the only one that people seem to have had any luck with and it still doesn’t work!

  • 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-18T05:19:44+00:00Added an answer on June 18, 2026 at 5:19 am

    I’ve now solved this issue myself. Essentially, before the Projection of the MapView is ready, these functions will respectively return 0 and 360*1E6 for latitude and longitude. As such, all that needs to be done is in an AsyncTask perform checks on these values until they have been prepared.

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

Sidebar

Related Questions

I am using following code to get current latitude and longitude. But none of
Currently I using the following code to get my JSON output from MySQL. <?php
I am currently using the following code to get an UIImage from an ALAsset
I'm currently using the following PHP code: // Get all subordinates $subords = array();
Currently I am using following code to get data sorted by starting letter of
I'm currently using the following code from this tutorial to automatically split the WordPress
I'm currently using the following simple code to insert content into TinyMCE's editor: tinyMCE.get(ole_mce).execCommand(mceInsertContent,false,'hello
I am currently using the following code to get the email id of the
I am currently using the following code to get the current row and column
I am currently using the following code to read the first character from the

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.