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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:23:28+00:00 2026-06-11T16:23:28+00:00

My map view contains many pinpoints.When ever the user takes that activity the map

  • 0

My map view contains many pinpoints.When ever the user takes that activity the map should be zoomed in such a level the correct 3 pints are visible.The map should not be zoomed more or less it should be exactly three.I know zoom level of the map can be varied from 0 to 21 through code.But is there any way to set the zoom level in such a way that exact 3 pins are visible in both the cases if the pins are far or near correct 3 should be visible?Is there any functionality in the API to set like that?

  • 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-11T16:23:29+00:00Added an answer on June 11, 2026 at 4:23 pm

    With points being all the geopoints you want to be visible on your map.

    private void Zoom() {
        int minLatitude = Integer.MAX_VALUE;
        int maxLatitude = Integer.MIN_VALUE;
        int minLongitude = Integer.MAX_VALUE;
        int maxLongitude = Integer.MIN_VALUE;
    
        for (GeoPoint p : points) {
            int lati = p.getLatitudeE6();
            int lon = p.getLongitudeE6();
    
            maxLatitude = Math.max(lati, maxLatitude);
            minLatitude = Math.min(lati, minLatitude);
            maxLongitude = Math.max(lon, maxLongitude);
            minLongitude = Math.min(lon, minLongitude);
        }
        mapController.zoomToSpan(Math.abs(maxLatitude - minLatitude),
                Math.abs(maxLongitude - minLongitude));
        mapController.animateTo(new GeoPoint((maxLatitude + minLatitude) / 2,
                (maxLongitude + minLongitude) / 2));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view that contains a google map accessible via this.map within the
I am trying to load view that contains a map view and 2 buttons,
I am just wondering how to center the map view as the user is
I have a View that contains a usercontrol. The usercontrol is rendered using: <%
I have a basic map view in my app which contains a set of
I have a UITableView in a UINavigationController that contains a rightBarButtonItem which should hide
At the moment I have a view that contains an MKMapView. I also have
The idea is as follows: the view contains a map (can be a zoomable
I have a view that I have been trying to map in either entity
I have a FrameLayout view which contains one (MapView-like) control and some additional buttons

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.