Topics
Getting Started
Cmd Line Opts
Tcl/Tk Version
X/Motif Version
NS Plugin Version
ActiveX Version
•   Embed in IE
•   Embed in PPT
•   Navigation
Configuration
Creating Data
OAA Interface
   
Go to FAQ
 

Digital Earth > TerravisionTM > User Guide > ActiveX

Embedding The TerraVision ActiveX Component in IE

You can embed the TerraVision ActiveX control inside your Internet Explorer web browser to enable you to show web-based 3D flythroughs. In order to do this, you must first install the TerraVision Plugins. This will deal with registering the TerraVision ActiveX control with your system.

Once installed, you can insert a TerraVision object into your web pages by inserting HTML code such as the following.


  <OBJECT ID="mytv" NAME="mytv" width="450" height="450"
   classid="clsid:BEB6E5D6-5455-4BF2-A70B-8BCA1B241C2E">
  </OBJECT>
You can also specify any of a number of options to the object when you create it. For example, the following list illustrates creating the TerraVision object and setting most of the available options.

  <OBJECT ID="mytv" NAME="mytv" width="450" height="450"
   classid="clsid:BEB6E5D6-5455-4BF2-A70B-8BCA1B241C2E">
     <param name="_Version" value="65536">
     <param name="_ExtentX" value="13705">
     <param name="_ExtentY" value="10504">
     <param name="_StockProps" value="0">
     <param name="featuresBackfaceCull" value="0">
     <param name="featuresLoadTextures" value="0">
     <param name="freezeTiles" value="0">
     <param name="scaleIPD" value="1">
     <param name="showCrosshair" value="1">
     <param name="showDatasets" value="0">
     <param name="showFeaturesWireframe" value="0">
     <param name="showFeaturesTextured" value="0">
     <param name="showFeaturesLighting" value="1">
     <param name="showFrustums" value="0">
     <param name="showGround" value="1">
     <param name="showHUD" value="1">
     <param name="showLightinge" value="1">
     <param name="showLogo" value="0">
     <param name="showModels" value="1">
     <param name="showPaths" value="0">
     <param name="showSky" value="1">
     <param name="showTextures" value="1">
     <param name="showTileDebug" value="0">
     <param name="showTiles" value="0">
     <param name="showWireframe" value="0">
     <param name="use2DConstrain" value="0">
     <param name="useBackfaceCull" value="1">
     <param name="useHeightBasedNavigation" value="1">
     <param name="useHorizonCull" value="1">
     <param name="useMipMapTextures" value="1">
     <param name="useZBufferHack" value="1">
  </OBJECT>
You cannot directly load an initial dataset selection using this interface. You must send an event to the control via JavaScript or VBScript. The following HTML sample show how you can have the control automatically load an initial set of terrain models using an embedded Visual Basic script. Note that you can use the same JavaScript interface for the ActiveX component as you can for the Netscape Plugin.

<SCRIPT LANGUAGE="VBScript">
Sub Window_onLoad()
  TerraVision_Render
end Sub

Sub TerraVision_Render()
  mytv.loadTerrain "http://www.tvgeo.com/TileSets/Pyramids/gtopo30.oi", "http://www.tvgeo.com/TileSets/Pyramids/gtopo30.dem"
  mytv.startRendering
End Sub
</SCRIPT>
You can also do this manually, if you wanted to, using JavaScript. The HTML segment shows how to create a button on the page that once clicked will load the gtopo30 earth dataset from the SRI web server.

<script language="JavaScript">
function tv_load() {
  var rooturl = "http://www.tvgeo.com/TileSets/Pyramids/gtopo30"
  var cmdstr = "loadterrain('"+rooturl+".oi','"+rooturl+".dem')"
  document.mytv.cmd( cmdstr );
}
</script>

<form>
<input type="button" value="Load Initial Worlds" onclick="tv_load()">
</form>

TerraVision in Explorer

 

 

Copyright ©2000 SRI International. All rights reserved.

For more information, please contact: digital-earth@ai.sri.com.
Last updated: Monday, 12-Mar-2001 14:35:08 PST.