See this developer’s guide’s section on Picking for more information. Picking is also provided by the WorldWindow. Its associated navigator translates user input to movements of the globe. Behind the scenes, the WorldWindow retrieves imagery and elevation from the internet as needed, generates 3D terrain, and traverses the layer list to display its contents. Apps need do nothing but add layers and perhaps shapes and initiate redraws when it does so. The WorldWindow manages the display of the virtual globe or 2D map. The first thing most apps do is populate it with one or more imagery layers. The layer list holds all layers displayed in that WorldWindow, but it is initially empty. The globe and navigator may subsequently be replaced by the app if desired. These are all created automatically during construction of the WorldWindow object. Each encapsulates a separate canvas and operates independently of the others.Ī WorldWindow contains a Globe, a Navigator and a Layer List. Here the canvas is given an initial width and height of 1000 pixels, but the style element causes it to resize to the width of the containing when displayed, and maintain the initial aspect ratio.Ī web page may contain multiple WorldWindows. The canvas, itself, is defined in the associated HTML page as follows: Here’s an example of creating a WorldWindow for a canvas whose ID is “canvasOne”: var wwd = new WorldWind.WorldWindow("canvasOne") The WorldWindow directs all drawing to that canvas. The canvas is given an ID and that ID is handed to the WorldWindow constructor to tell the WorldWindow its drawing surface. The app developer is responsible for creating the canvas, typically by defining a element in static HTML. Almost all interactions between the app and Web WorldWind occur through a WorldWindow.Ī WorldWindow encapsulates an HTML canvas element. It represents the presence of Web WorldWind in the web page. WorldWindow is the fundamental Web WorldWind object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |