Demo user Interface Google Earth - Google Maps

Using a combination of JScript and HTML+TIME, Google Earth can be controlled and animated.

This makes it possible to connect for instance Google Maps, TerraServer USGS, JPL-gm and other WMS server (China) maps and Google Earth. Channelling point positions between the applications. It is now very easy to transform on the fly whatever XML file to a KML data string and load that on the fly in Google Earth using the API. Update Dec 16th.

Updates till Dec 16th, 2005
  • This list will disappear in: 120 seconds.
  • Update Dec20: Panning is now synched with zoom level( one click is 1/3 of the map). Extra VML elements used
  • Update Dec19: The Application now has several maps under the GMpas API which can be interchanged and which are all linked to Google Earth. Different zoom levels per map type are synchronised. Map control is now both mousewheel and keyboard, zoom and pancontrol on map deleted.
  • Update Dec18: Added a China maptype(zoom 0 to 17) after www.step1.cn/map/. Navigation inChina maps and GEarth simultaneously.
  • Update Dec16: Added USGS maptype(zoom -2 to 15) after maps.kylemulka.com. Navigate in USGS map and GEarth simultaneously.
  • Update Dec16: Zoom and PAN GMaps by mousewheel and keyboard and have GEarth follow.
  • Update Dec11: Added the XMaps library (Chris Smoak) to the Demo for additional features like dashed-arrowheaded polylines etc
  • todo : Make a Flypath of GPX track with XSLT load the sequence and let GE fly the path.
  • Update Dec 11th: Play a track/route in GEarth, pull the points into the webpage and plot a Polyline in Gmaps, simultaneously!! This is fun!
  • Todo: Opening Web URL files in GEarth by script.
  • Update Dec8: Send a play-tour/click-and-zoom/G-force track from GEarth to webpage and transform it to GPX file/KML file.
  • Update Dec8: Automatically shot 2 screen images with lat/lon shift for Stereo Viewing. (click in Gmap and Gearth will take and show stereo images of that location.
  • Update dec6: Send a cursored track from GEarth to GMaps and show Polyline on Gmaps.(shaky)
  • Update Dec 2: Stereo Viewing in B and W Popup!
  • Update Dec 2: Create KML datastring in webpage and send it to GEarth.
  • Update Dec 2: Create auto-Placemark(KML datastring) in GEarth for the point clicked in GMaps.
  • Major Update Dec 1: XSLT transforming a GPX file to a KML string and express on the fly in GE.
  • Update Dec1 : Retrieving map downloaprogress for ScreenShot image timing.
  • Update Nov 26: Launching and Closing Google Earth from script.
  • Update Nov 26: Controlling/Animating Latitude, Longitude, Range, Tilt and Azimuth
  • Update Nov 26: Making a B and W Screen dump and saving it.
  • Update Nov 27: Launching the Screen Shot in a IE Popup for Printing.
  • Update Nov 27: Sending a GMaps point to GEarth and have a Fly to with speed setting.
  • Update Nov 27: Getting real-time cursor lat/lon locations and saving them.
  • Update Nov 27: Setting GEarth window size by script
  • Update Nov 27: Opening local GPX from script.
  • Update Nov 27: Opening Local KML from script.

Viewport:

Fly to:

get coordinates
Animations for Tilt Heading Range Latitude Longitude
Fly GEarth to Get Google Earth coordinates Latitude: Longitude:
Speed: Set Google Maps location Range: Tilt: Heading:
Longitude: 0 Lon from to
Latitude: 0 Lat from to
Range: 0 Range from to
Tilt: 0 Tilt from to
Azimuth: 0 Azimuth from to

Google Maps interface now zooms and pans (on Maps center) with mousewheel and keyboard while Google Earth follows the movements. (After Kyle Mulka adde USGS maps working similar to GMaps with GEarth!) Zoom by mousewheel and plus/minus keys - one level, shift-plus/minus two levels at a time. Panning is now synched with zoom level. For panning East/West use Left/Right arrows, num key 4/6, for North/South use Up/Down-arrows or num 8/2 keys. NE numkey 9, SE numkey 3, SW numkey 1 and NW numkey 7. To set a new destination click the map. The new destination marker is replaced by an animated gif file.
The destination will be send to Google Earth where a Placemark will be created at that same position(depoending on selection).
Google Earth will fly to the point and takes two Black and White Snapshots which will be shown in a popup when the GE map has downloaded 100%. Enjoy the flight, Cybarber!
Crosshairs: Fly to:
zoom backgroundimage
 
 
Download Progress:
%, Zoom: 0x
Download timer:
0
Take Snap shots
Stereo or Single Shot.
Placemarks NO or Yes:
Stereo Base:
Quality (2-99):
Preview modes:
Track 0 Recording
Plot-segment length: pts
line pattern:
Pre-set Recording time: sec
     

Logging a flight path in GEarth, converting it to a path datastring and sending it back to Gearth

For a free flight, set Naviagation Mode/Click-and-Zoom or G-Force, Control/Advanced/Fly-To-Speed at 0.35 ~0.5 and viewport at Fullscreen. For track/route replay set tilt 0. Range will be transferred to Gmaps.

Send polyline Array data to GMaps: Clear polyline Array data container:

Load KML stringdata in Google Earth by loadKML(string) function

Send KML data string to GE: Clear KML data string container:

Take manual Color Stereo 3D Screen dumps in Google Earth with auto Camera base shift

Setup your Google Earth viewport for the first left-side color image. Save image(CTRL-S) manually under name "tmp998.jpg". If desired, re-set the stereo base factor for stereo effect(15~30): . Push the   button to move camera to the right (stereofactor/range). Save second right-side image manually under name "tmp999.jpg"(CTRL-S). If needed, increase the % side-crop for non-overlapping parts. Note: as the compass, copyright notice and google logo are disturbing the 3D view the bottom 14% is clipped by default   . Compose your image such that the bottom 10-15% is not relevant so you can safely clip it. Adjust the bottom clip percentage(%) to hide the logo and compass. Hit   button to view result below.

Set your viewing preference "Cross-Eyed" (checked) or "Parrallel" :

Some samples of 'auto' B&W and 'semi-auto' color-3D-Stereo Screenshots:

Side-clip: %  Bottom-clip: %    


BBox Coordinates (WSEN):
Get screencenter height:

GMaps Zoom versus GEarth Eye Alititude

Gmaps x GEarth m Gmaps x GEarth Km Gmaps x GEarth Km
-2 156
-1 312
0 625 6 40 12 2560
1 1250 7 80 13 5120
2 2500 8 160 14 10240
3 5000 9 320 15 20480
4 10000 10 640 16 40960
5 20000 11 1280 17 63710

Open a KML/KMZ/GPX local file in GE using the API (Web URL fails?)

Transform a GPX file by XSLT to a KML data string and open kmlstring in GE by API


get coordinates

KML file
GoogleEarth API
__ ____________________________________________

Library KEYHOLELib
Keyhole 1.0 Type Library
____________________________
Class KHFeature
element of KEYHOLELib
KHFeature Class

Property hasView As Long
write protected
element of KEYHOLELib.KHFeature
property hasView

Property visibility As Long
element of KEYHOLELib.KHFeature
property visibility
____________________________
Class KHInterface
element of KEYHOLELib
KHInterface Class

Property autopilotSpeed As Double
element of KEYHOLELib.KHInterface
property autopilotSpeed

Function currentView(terrain As Long) As KHViewInfo
element of KEYHOLELib.KHInterface
property currentView

Property currentViewExtents As KHViewExtents
write protected
element of KEYHOLELib.KHInterface
property currentViewExtents

Function getFeatureByName(name As String) As KHFeature
element of KEYHOLELib.KHInterface
method getFeatureByName

Function getPointOnTerrainFromScreenCoords(screen_x As Double, screen_y As Double) As Double()
element of KEYHOLELib.KHInterface
method getPointOnTerrainFromScreenCoords

Sub LoadKml(kmlData As String)
element of KEYHOLELib.KHInterface
method LoadKml

Sub OpenFile(fileName As String)
element of KEYHOLELib.KHInterface
method OpenFile

Sub QuitApplication()
element of KEYHOLELib.KHInterface
method QuitApplication

Sub SaveScreenShot(fileName As String, quality As Long)
element of KEYHOLELib.KHInterface
method SaveScreenShot

Sub setFeatureView(feature As KHFeature, speed As Double)
element of KEYHOLELib.KHInterface
method setFeatureView

Sub SetRenderWindowSize(width As Long, height As Long)
element of KEYHOLELib.KHInterface
method SetRenderWindowSize

Sub setView(view As KHViewInfo, terrain As Long, speed As Double)
element of KEYHOLELib.KHInterface
method setView

Sub setViewParams(lat As Double, lon As Double, range As Double, tilt As Double, azimuth As Double, terrain As Long, speed As Double)
element of KEYHOLELib.KHInterface
method setViewParams

Property streamingProgressPercentage As Long
write protected
element of KEYHOLELib.KHInterface
property streamingProgressPercentage
____________________________
Class KHViewExtents
element of KEYHOLELib
KHViewExtents Class

Property east As Double
write protected
element of KEYHOLELib.KHViewExtents
property east

Property north As Double
write protected
element of KEYHOLELib.KHViewExtents
property north

Property south As Double
write protected
element of KEYHOLELib.KHViewExtents
property south

Property west As Double
write protected
element of KEYHOLELib.KHViewExtents
property west
____________________________
Class KHViewInfo
element of KEYHOLELib
KHViewInfo Class

Property azimuth As Double
element of KEYHOLELib.KHViewInfo
property azimuth

Property latitude As Double
element of KEYHOLELib.KHViewInfo
property latitude

Property longitude As Double
element of KEYHOLELib.KHViewInfo
property longitude

Property range As Double
element of KEYHOLELib.KHViewInfo
property range

Property tilt As Double
element of KEYHOLELib.KHViewInfo
property tilt
	  
		This is a web application with a Google Earth ActiveX object and
		a Google Maps Javascript interface for Internet Explorer.

		The page is a bridge between GMaps and GEarth.
		This application makes data interchange between the two Google services possible.
		
		Google Earth can be controlled from the page and thus from Google Maps by
		using the methods and properties exposed by the GEarth API.
		
		HTML+TIME (SMIL) and VML are used for animation and display.
				
		Please view this page with Internet Explorer 6 or 7 
		instead of the one you are currently using.
	
		Script: William A Slabbekoorn - December 2005
    __   
   / _)      _        __   _    _  __ 
   |(_ \\ /||_) //_\ ||_)||_) ||_ ||_)
   \__) || ||__)|| | || \||__)||_ || \
	 
	
	http://www.smiletime.org/GeGmGui.html
	Copyright: Cybarber Web Services, William A Slabbekoorn, 2005.