IanMayo / earth-api-samples

Automatically exported from code.google.com/p/earth-api-samples
0 stars 1 forks source link

Allow flying to a best-fit view of a feature programmatically (ala NetworkLink's flyToView) #39

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
A FlyToView can be automatically created by a NetworkLink, that ensures all 
features are visible and centered on the screen, no matter what the browser 
size and configuration. When using fetchKml this view has to be included in the 
KML file or created manually, neither of which can account for the current 
browser size and configuration. Since the functionality is already there, it 
would be nice to be able to programmatically invoke the automatic FlyToView for 
a particular file, at any time, without the requirement of using a NetworkLink.

Requested by: DougH

Supported by: ITS4IP, jan.wischnat

Original issue reported on code.google.com by api.roman.public@gmail.com on 12 Aug 2008 at 8:46

GoogleCodeExporter commented 8 years ago
After we create a polygon or a polyline,it would be better,if we can obtain the 
bound of this gemetry,which can  be the best fit view. 

Original comment by great...@gmail.com on 4 Nov 2008 at 2:28

GoogleCodeExporter commented 8 years ago

Original comment by api.roman.public@gmail.com on 2 Dec 2008 at 12:12

GoogleCodeExporter commented 8 years ago
Issue 29 has been merged into this issue.

Original comment by api.roman.public@gmail.com on 2 Dec 2008 at 12:14

GoogleCodeExporter commented 8 years ago
Definitely a necessary animal for Folders, NetLinks, and Lines with LatLong 
stacks!

Original comment by BeamG...@gmail.com on 17 Dec 2008 at 8:41

GoogleCodeExporter commented 8 years ago

Original comment by api.roman.public@gmail.com on 5 Feb 2009 at 8:09

GoogleCodeExporter commented 8 years ago
This feature is very useful to find the feature back.

Original comment by qlu...@yahoo.com on 5 Mar 2009 at 1:42

GoogleCodeExporter commented 8 years ago

Original comment by api.roman.public@gmail.com on 9 Aug 2009 at 12:55

GoogleCodeExporter commented 8 years ago
Additionally it would be nice to fly to a feature (best-fit) from within a 
playlist (gx:Tour)

Jarl

Original comment by j...@gavia.dk on 2 Nov 2009 at 7:06

GoogleCodeExporter commented 8 years ago
hm, but there is a solution, i think :)
use this: http://code.google.com/p/earth-api-utility-library/wiki/
GEarthExtensionsReference

gex = new GEarthExtensions(ge);

and add this to Your fetchUserKmlFinished()
ge.getFeatures().appendChild(kmlObject);
gex.util.flyToObject(kmlObject, true);

Original comment by grzegorz...@gmail.com on 28 Jan 2010 at 7:33

GoogleCodeExporter commented 8 years ago
While this workaround my help some users, I find GEX's functions for setting the
bounds view to be too approximate.  They are better/worse depending on how far 
out
you are zoomed.  An actual built in function might do a much better job. 

Original comment by chimpath...@gmail.com on 30 Jan 2010 at 9:51

GoogleCodeExporter commented 8 years ago
of course, You are absolutely right
but.... as far as now, this is the only solution i know, and everyone needs to 
wait 
for the release :)
but if someone can't....

Original comment by grzegorz...@gmail.com on 31 Jan 2010 at 12:09

GoogleCodeExporter commented 8 years ago
Pro tip... Don't try and test how many placemarks are in the feature before 
calling flyToObject as a performance optimization. You may trigger the bug in 
Issue 594.

Original comment by underbluewaters on 3 Feb 2011 at 5:11

GoogleCodeExporter commented 8 years ago

Original comment by api.roman.public@gmail.com on 28 Jul 2011 at 4:08

GoogleCodeExporter commented 8 years ago
Hi there,

i want to use kml file having number of kmlplacemarks and it's shown in 
treepanel.
when i click on node(kmlplacemarks), it will not flytoview on web browser 
google earth plugins.

Here i am use Ext.ux.GoogleEarthPanel.
Pl. help me

Original comment by prakshepbjani@gmail.com on 19 Nov 2011 at 9:07

Attachments:

GoogleCodeExporter commented 8 years ago
Using the extensions really slows down the performance. 

Original comment by shorif2...@gmail.com on 28 Nov 2012 at 12:13