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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:50:32+00:00 2026-06-09T00:50:32+00:00

I am drawing the circle on map with specifying the radius and it’ll draw

  • 0

I am drawing the circle on map with specifying the radius and it’ll draw the circle successfully. But when I change the size of circle using seekbar I need to feet the circle in screen and zoom the map of that level, I have not idea about this, need your guideline thank you.

  • 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-09T00:50:34+00:00Added an answer on June 9, 2026 at 12:50 am

    After long time I found the solution from somewhere.

    here is the method which was giving me the min lat/lng and max lat/lng.
    Based on this I have getting the latspan and longspan.

    public void boundingCoordinates(double distance, double radius) {
    
        if (radius < 0d || distance < 0d)
            throw new IllegalArgumentException();
    
        // angular distance in radians on a great circle
        double radDist = distance / radius;
    
        double radLat = Math.toRadians(gp.getLatitudeE6()/1e6); // here is your single point latitude gp.getLatitude
        double radLon = Math.toRadians(gp.getLongitudeE6()/1e6); // here is your single point longitude gp.getlongitude
    
        double minLat = radLat - radDist;
        double maxLat = radLat + radDist;
    
        double minLon, maxLon;
        if (minLat > MIN_LAT && maxLat < MAX_LAT) {
            double deltaLon = Math.asin(Math.sin(radDist) /Math.cos(radLat));
            minLon = radLon - deltaLon;
    
            if (minLon < MIN_LON) 
                minLon += 2d * Math.PI;
    
            maxLon = radLon + deltaLon;
    
            if (maxLon > MAX_LON) 
                maxLon -= 2d * Math.PI;
        } else {
            // a pole is within the distance
            minLat = Math.max(minLat, MIN_LAT);
            maxLat = Math.min(maxLat, MAX_LAT);
            minLon = MIN_LON;
            maxLon = MAX_LON;
        }
    
        minLat = Math.toDegrees(minLat);
        minLon = Math.toDegrees(minLon);
        maxLat = Math.toDegrees(maxLat);
        maxLon = Math.toDegrees(maxLon);
    
        minGeo = new GeoPoint((int)(minLat*1e6),(int)(minLon*1e6));
        maxGeo = new GeoPoint((int)(maxLat*1e6),(int)(maxLon*1e6));
    }
    

    now you pass the distance in any unit as per that you have to pass the radius of earth for example if you pass 2 km then the radius of earth is in km say 6370.997.

    you can try it, its cool thing

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

Sidebar

Related Questions

Following Mootools class helps developer to draw a circle overlay on Google Map using
When drawing an editable Polygon on a map using Google's V3 API, is there
Hi I am drawing a circle using wxpython for a project.Please look through the
i want to crop image via drawing circle using touchMoved event. so how can
I know there are already libraries for drawing a circle in JavaScript but I
Im drawing a circle and even if i draw a basic shape (eg.square, diamond)
I am using Bresenham's circle algorithm for fast circle drawing. However, I also want
UPDATE: Summary: I can draw a circle using TRIANGLE_FAN and, separately, I also can
I have an html5 canvas drawing application similar to this http://jsfiddle.net/rnNFB/1/ , but using
I am drawing a circle using cocos2d, I set alpha to 0 using glColor4ub,

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.