Export to GitHub

earth-api-samples - issue #42

Get Bounding Box of current viewport


Posted on Aug 12, 2008 by Happy Monkey

Similar to GMap2's getBounds() or the BBOX coordinates sent with a Google Earth request.

Requested by: pabu

Supported by: billChadwick, jan.wischnat

Comment #1

Posted on Oct 29, 2008 by Happy Monkey

I think this feature is extremely important.

Comment #2

Posted on Oct 29, 2008 by Happy Monkey

(No comment was entered for this change.)

Comment #3

Posted on Nov 1, 2008 by Happy Monkey

I'd like this too (for the moment, I'll try using lookAt.getRange(), which I gather, by trial-and-error, gives the width of the current view in meters (hey Google, what about improving the documentation on getRange -- what does it return, exactly? In general, I find GE documentation to be a bit skimpy.)

Comment #4

Posted on Dec 2, 2008 by Happy Monkey

(No comment was entered for this change.)

Comment #5

Posted on Dec 2, 2008 by Happy Monkey

(No comment was entered for this change.)

Comment #6

Posted on Jan 21, 2009 by Happy Bird

I also need this feature my application. I was using the Network Link feature and extracting the BBOX to get this information, however the Placemarks I generated cannot be iterated if I create them using a KML file.

Where are the Placemark objects stored when they are generated via the Network Link in this manner? NetworkLink does not have a "getChildren()" method but when I examine the getParentNode() of a Placemark passed to me through an event handler, it claims its parent is a "NetworkLink".

Comment #7

Posted on Feb 5, 2009 by Happy Monkey

Issue 127 has been merged into this issue.

Comment #8

Posted on Apr 2, 2009 by Happy Monkey

This long-requested feature is now available as of 5.0.11655.6079, as GEView.getViewportGlobeBounds

See the release notes, new Google Earth Plugin 5.0 samples, and updated v1.002 API reference for more details.

http://code.google.com/apis/earth/documentation/releasenotes.html#2009-03-31 http://code.google.com/apis/earth/documentation/demogallery.html?topic=fiveoh http://code.google.com/apis/earth/documentation/reference/index.html

Comment #9

Posted on Feb 9, 2011 by Happy Camel

GEView.getViewportGlobeBounds is returning incorrect results. The results are outside of the viewing area. I need a function returning the coordinates of the corners of the current view.

Comment #10

Posted on Feb 22, 2011 by Helpful Ox

To ensure you're getting the correct hit test result, please see comment 4 on Issue 361 .

Status: Fixed

Labels:
Type-Enhancement Priority-Medium Internal-1253150