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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:00:28+00:00 2026-05-31T19:00:28+00:00

I am doing a project where I need to find the closest 10 markers

  • 0

I am doing a project where I need to find the closest 10 markers from my current location On Google map in Android.
Is there any API or inbuilt function/class that displays these things?
I have little bit knowledge of Google Maps in Android.

I need to find 10 closest marked place on google map and its lat long and title in my list view…

Plz Plz Help me out.!

  • 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-31T19:00:29+00:00Added an answer on May 31, 2026 at 7:00 pm

    you need to use following method for finding distance between two geo points.

    /**
     * 
     * @param lat1 Latitude of the First Location
     * @param lng1 Logitude of the First Location
     * @param lat2 Latitude of the Second Location
     * @param lng2 Longitude of the Second Location
     * @return distance between two lat-lon in float format
     */
    
    public static float distFrom (float lat1, float lng1, float lat2, float lng2 ) 
    {
        double earthRadius = 3958.75;
        double dLat = Math.toRadians(lat2-lat1);
        double dLng = Math.toRadians(lng2-lng1);
        double a = Math.sin(dLat/2) * Math.sin(dLat/2) +
        Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) *
        Math.sin(dLng/2) * Math.sin(dLng/2);
        double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
        double dist = earthRadius * c;
    
        int meterConversion = 1609;
    
        return new Float(dist * meterConversion).floatValue();
    }
    

    Here your first geo codes will be your current Position’s geo code and other geo points are the geo points you want to compare with , you need to run a loop for it.

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

Sidebar

Related Questions

I am doing a project and need to use the facebook API as user
I'm doing a Get and Post method for an android project and I need
I'm doing a project where I need to either find or build an RSA
I am developing an android app for my project, I need to find room
I am doing another Project Euler problem and I need to find when the
Im doing this project where i need to download files through a webservice (images,
I'm doing a project in Python (3.2) for which I need to compare user
I am doing a project at the moment and I need an efficient method
I am doing a project, for which I need to know all the wikipedia
So I'm doing this project for my OO class. We need to create two

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.