![]() ![]() inCurrentFrame - A read-only boolean indicating whether the layer was actually drawn during the most recent redraw.The layer is not displayed if the eye altitude is above this value. maxActiveAltitude - A number specifying the eye altitude below which the layer is displayed.The layer is not displayed if the eye altitude is below this value minActiveAltitude - A number specifying the eye altitude above which the layer is displayed.opacity - A number between 0 and 1 that enables you to make an layer and its contents semi-transparent.pickEnabled - A boolean indicating that the layer and its contents do not participate in picking. ![]() enabled - A boolean that enables you to turn the layer off while leaving it in the layer list.displayName - A string that you can use to give the layer a name that would be displayed, for example, in a layer manager.Wwd.addLayer(new WorldWind.ViewControlsLayer(wwd)) Wwd.addLayer(new WorldWind.CompassLayer()) Create and add a compass and view controls. Create and add layers for shapes, but don't add any shapes yet. Wwd.addLayer(new WorldWind.BingAerialWithLabelsLayer(null)) Var wwd = new WorldWind.WorldWindow("canvasOne") The above layer list is defined and the layers added to the WorldWindow by the following code: // Create the WorldWindow. (3D shapes within layers, however, are displayed in far-to-near order, as described in the Shapes section.) The adjacent illustration depicts six layers. During rendering, layers are displayed in the order they’re defined in the layer list. Each layer contains either imagery, shapes or decorations such as a compass. Each WorldWindow holds one layer list that contains all the layers to display in that WorldWindow. The first time you run it will ask you to select the main class, choose the HelloWorldWindMain, click OK.LayerListLayers hold all the information displayed by the WorldWindow. Example: =C:\Users\george\Desktop\worldwindAdd VM command line optionsĬhoose Run->Run Main Project, or, hit F6. With the Run category selected enter =/path/to/directory in the VM Options text box, click OK. Right click you project and choose Properties. The last step is telling our project where to find everything. Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME) Inside your HelloWorldWindMain() method, just after initComponents() add the following: Add import .* to the source just below the first set of comments. Initialize the WorldwindowGLCanvas class.Ĭlick on the source tab. Here you can resize the WorldWindowGLCanvas, so that it takes up the full JFrame.Add WorldWindGLCanvasħ. Simply drag and drop the WorldWindowGLCanvas from the palette onto the JFrame. Add the WorldWindowGLCanvas to your JFrame. Enter a class name, I chose “HelloWorldWindMain”, click finish.Add JFrameĦ. Right click you project and choose New->JFrame Form. Click OK to close the Project Properties.Add the Libraries Now select the Run tab and add jogl.jar and gluegen-rt.jar. Browse to your unzipped worldwind directory and choose worldwind.jar. With the Compile tab selected, click Add JAR/Folder button. Choose libraries from the categories list. Right click on your newly created project from the project explorer frame and choose Properties. Choose a project name, for the example I chose “HelloWorldWind”, uncheck the “Create Main Class” check box, click Finish.Create new Java Project Choose General - Java Application and Click next. Click Close on the Palette Manager.Ĭhoose File -> New Project. Choose Swing as the Palette Category, click Finish. This will list all the JavaBeans inside the JAR, choose the WorldWindowGLCanvas, click Next. Browse to the unzipped worldwind sdk directory and choose worldwind.jar, click Next. Add the WorldWindowGLCanvas to the palette.Ĭhoose Tools->Palette Manager->Swing/AWT Components. Before we get started you need to make sure that you download and unzip the World Wind SDK - Java World Wind SDK. I will explain how to get the WWJ SDK going in NetBeans 5.5.1 in this article. This lesson will be a very simple Hello World demonstrating the Nasa World Wind Java SDK. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |