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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:59:36+00:00 2026-05-27T17:59:36+00:00

I am currently developing an app for getting nearest banks and atms from the

  • 0

I am currently developing an app for getting nearest banks and atms from the current location of user. I am successfully getting all the details from Google Places API but now i wish to sort them according to nearest to the user. Right now it is giving me random means the first results which i am getting is not nearest to user. I want that the first data and others are sorted on the basis of distance from users current location.

If anyone has idea then please kindly help me.

Thanks!!!

  • 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-27T17:59:37+00:00Added an answer on May 27, 2026 at 5:59 pm

    First try to current latitude and longitude of the end user and bank or ATMs.

    Then, calculate the distance between (the current location and all the banks and ATMs) both of them with the method distanceTo().

    Store the distance in the hashmap or arraylist as convenient to you.

    Then, sort this distance. Whichever distance is less, retrieve it. It will be the nearest place.

    Use this.

    float dist = user_location.distanceTo(bank_or_atm_location);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I'm developing a registration form for new user in Android (native app.) and
I'm current developing web-app that allows a user to associate their account with their
I´m currently developing a Struts2 app where a user will make one of three
I have finished developing my app and am currently deploying it. I'm getting a
In the iPhone app that I am currently developing, I present several alert views
I have a search form in an app I'm currently developing, and I would
Good evening, In my app that I'm currently developing, I have a class that
Currently, I am developing an app for a China customer. China customer are mostly
I'm developing a web app and currently using sql server 2008 for it. But,
I'm currently in the middle of developing an iPhone app with a big reference

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.