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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:48:46+00:00 2026-05-24T23:48:46+00:00

I have several polygons drawn on the surface in google earth plugin. I generate

  • 0

I have several polygons drawn on the surface in google earth plugin. I generate a KML from them.

Question is how can I calculate parameters for the LookAt so that the view includes all the polygons when open in the desktop Google Earth?
For lat and lon it’s quite simple – just calculate the center of bounding box, but what about altitude and range parameters?

For example we have two polygons:

1:
    40.724536 -74.001914
    40.724102 -74.001091
    40.723003 -74.002067
    40.723392 -74.002891
2:
    40.723186 -74.003112
    40.722843 -74.002311
    40.721977 -74.003036
    40.722320 -74.003738

Then lon and lat will be
lon=(40.724536+40.721977)/2=40.7232565
lat=-(74.001091+74.003738)/2=-74.0024145

Now how to calculate the range and altitude?

  • 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-24T23:48:47+00:00Added an answer on May 24, 2026 at 11:48 pm

    Take a look at the Google Earth API Utility Library. It augments the functionality of the Earth API providing useful helper methods which wrap up commonly needed tasks for you.

    It includes a createBoundsView() method which will build you a LookAt object configured to fit a given bounding box within the viewport. Does exactly what you need I think. e.g.

    function flyToBox(max_x, max_y, min_x, min_y) {
      var bounds = new geo.Bounds([min_y, min_x], [max_y, max_x]);
      var options = {aspectRatio : $('#map3d').width() / $('#map3d').height(), scaleRange : 2};
      ge.getView().setAbstractView(gex.view.createBoundsView(bounds, options));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several polygons & I like to extract mean values from several raster
I have several log files of events (one event per line). The logs can
I'm going to have meshes with several coplanar polygons, all lying in a certain
I have a Canvas, to which I've added several thousand polygons. I would like
I need to draw a Polygon from several points (I have their latitude, longitude).
Let's say we have a set of polygons, can change the camera view angle
I have several cron jobs and I'd like to perform some calculations on them,
I have several ASP:TextBox controls on a form (about 20). When the form loads,
I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on
I have several tables whose only unique data is a uniqueidentifier (a Guid) column.

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.