::EarthTop, Main, Index
The Earth
namespace provides commands to control Google Earth.
CommandsTop, Main, Index
IsInitialized [::Earth]Top, Main, Index
Check, if a GoogleEarth instance is initialized.
IsInitialized appId
Parameters
appId | Identifier of the GoogleEarth instance. |
Return value
Returns true or false dependent on the initialization status.
proc ::Earth::IsInitialized {appId} { # Check, if a GoogleEarth instance is initialized. # # appId - Identifier of the GoogleEarth instance. # # Returns true or false dependent on the initialization status. return [$appId IsInitialized] }
Open [::Earth]Top, Main, Index
Open a GoogleEarth instance.
Open
Description
Use an already running instance, if available.
Return value
Returns the identifier of the GoogleEarth application instance.
See also
proc ::Earth::Open {} { # Open a GoogleEarth instance. # # Use an already running instance, if available. # # Returns the identifier of the GoogleEarth application instance. # # See also: OpenNew Quit variable earthAppName set appId [Cawt GetOrCreateApp $earthAppName true] return $appId }
OpenNew [::Earth]Top, Main, Index
Open a new GoogleEarth instance.
OpenNew
Return value
Returns the identifier of the new GoogleEarth application instance.
See also
proc ::Earth::OpenNew {} { # Open a new GoogleEarth instance. # # Returns the identifier of the new GoogleEarth application instance. # # See also: Open Quit variable earthAppName set appId [Cawt GetOrCreateApp $earthAppName false] return $appId }
Quit [::Earth]Top, Main, Index
Quit a GoogleEarth instance.
Quit appId
Parameters
appId | Identifier of the GoogleEarth instance. |
Return value
Returns no value.
See also
proc ::Earth::Quit {appId} { # Quit a GoogleEarth instance. # # appId - Identifier of the GoogleEarth instance. # # Returns no value. # # See also: Open variable earthProgName # Quit method not available, so we kill the application. # This may have some strange effects in comination with MediaPlayer. # Cawt KillApp $earthProgName }
SaveImage [::Earth]Top, Main, Index
Save a grey-scale image of the current view.
SaveImage appId fileName ?quality?
Parameters
appId | Identifier of the GoogleEarth instance. |
fileName | Name of image file. |
quality | Quality of the JPEG compression in percent. Optional, default 80 . |
Return value
Returns no value.
proc ::Earth::SaveImage {appId fileName {quality 80}} { # Save a grey-scale image of the current view. # # appId - Identifier of the GoogleEarth instance. # fileName - Name of image file. # quality - Quality of the `JPEG` compression in percent. # # Returns no value. $appId SaveScreenShot [file nativename $fileName] $quality }
SetCamera [::Earth]Top, Main, Index
Set camera position and orientation.
SetCamera appId latitude longitude altitude elevation azimuth
Parameters
appId | Identifier of the GoogleEarth instance. |
latitude | Latitude in degrees. Range [-90.0, 90.0]. |
longitude | Longitude in degrees. Range [-180.0, 180.0]. |
altitude | Altitude in meters. |
elevation | Elevation angle in degrees. Range [0.0, 90.0]. 0 degrees corresponds looking to the center of the earth. 90 degrees corresponds looking to the horizon. |
azimuth | Azimuth angle in degrees. Range [0.0, 360.0]. 0 degrees corresponds looking north. 90 degrees corresponds loooking east. |
Return value
Returns no value.
proc ::Earth::SetCamera {appId latitude longitude altitude elevation azimuth} { # Set camera position and orientation. # # appId - Identifier of the GoogleEarth instance. # latitude - Latitude in degrees. Range \[-90.0, 90.0\]. # longitude - Longitude in degrees. Range \[-180.0, 180.0\]. # altitude - Altitude in meters. # elevation - Elevation angle in degrees. Range \[0.0, 90.0\]. # 0 degrees corresponds looking to the center of the earth. # 90 degrees corresponds looking to the horizon. # azimuth - Azimuth angle in degrees. Range \[0.0, 360.0\]. # 0 degrees corresponds looking north. # 90 degrees corresponds loooking east. # # Returns no value. # SetCameraParams <latitude> <longitude> <altitude> <altMode> <range> # <tilt> <azimuth> <speed> # # <latitude> Latitude in degrees. # <longitude> Longitude in degrees. # <altitude> Altitude in meters. # <altMode> Altitude mode that defines altitude reference origin. # (1=above ground, 2=absolute) # <range> Distance between focus point and camera in meters. # If !=0 camera will move backward from range meters along the camera axis # <tilt> Tilt angle in degrees. # <azimuth> Azimuth angle in degrees. # <speed> Speed factor. Must be >= 0, if >=5.0 it's the teleportation mode $appId SetCameraParams $latitude $longitude 0.0 1 $altitude $elevation $azimuth 6.0 }