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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:50:46+00:00 2026-05-27T09:50:46+00:00

In this app I am trying to have a user enter GPS coordinates and

  • 0

In this app I am trying to have a user enter GPS coordinates and then a range to search, so enter: latitude, longitude, and distance in km. How do I validate GPS coordinates?

should I just have some method that checks if latitude is between -90 to 90 and if longitude is between -180 and 180 or is there a better way?

For users will just enter coordinates into an EditText window. There is probably a much better way to do this…any references that I should be reading?

  • 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-27T09:50:47+00:00Added an answer on May 27, 2026 at 9:50 am

    I’d test for the latitude being between -80 and +80, as the constructor of a GeoPoint ‘clamps’ it to +-80. I.e if you pass +85 in, then it gets changed to +80 without warning.

    In fact it does this for totally illegal values too, so rather than throwing an exception for +185, it just changes it to +80. Longitudes get clamped to +- 180.

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

Sidebar

Related Questions

I'm trying to have my Struts2 app redirect to a generated URL. In this
In my app, I want to be able to have the user enter their
In my app I'm trying to render text along a path; this is fine
I am trying to make this landscape only iphone app. I only use this
I am trying to use this code in my QT app QMap<QString,QMap> but there
I'm trying to use this fairly standard line of code in my app: [[UIApplication
Boost Network I am trying out this code in a small console app on
what i'm trying to do this this. Simply create a C# windows app that
So I have this app which needs to query entities from the Azure Tables
So I have this App in the store, and I would like to release

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.