zoukankan      html  css  js  c++  java
  • World Wind Java开发之一(转)

    http://blog.csdn.net/giser_whu/article/details/40477235

    参照《World wind Java三维地理信息系统开发指南随书光盘》以及官网论坛,开始学习World Wind Java开发。

    第一个demo

    [java] view plain copy
     
     print?在CODE上查看代码片派生到我的代码片
    1. //基础类  
    2. public class VGE_GFBasicClass extends JFrame  
    3. {  
    4.     protected WorldWindowGLCanvas worldWindowGLCanvas; //WorldWind 画布  
    5.     protected StatusBar statusBar;                  //状态栏  
    6.     protected Model modelEarth;  
    7.     protected LayerPanel layerPanel;                //图层面板  
    8.       
    9.     public VGE_GFBasicClass ()  
    10.     {  
    11.         //按指定尺寸创建画布  
    12.         Dimension canvasSize = new Dimension(800, 600);  
    13.         this.worldWindowGLCanvas = new WorldWindowGLCanvas();  
    14.         this.worldWindowGLCanvas.setPreferredSize(canvasSize);  
    15.   
    16.         // 创建Earth模型,并与画面绑定  
    17.         modelEarth = (Model) WorldWind  
    18.                 .createConfigurationComponent(AVKey.MODEL_CLASS_NAME);  
    19.         this.worldWindowGLCanvas.setModel(modelEarth);  
    20.         this.add(this.worldWindowGLCanvas, BorderLayout.CENTER);  
    21.   
    22.         // 增加状态栏  
    23.         this.statusBar = new StatusBar();  
    24.         this.add(statusBar, BorderLayout.PAGE_END);  
    25.         this.statusBar.setEventSource(worldWindowGLCanvas);  
    26.   
    27.         // 显示图层面板  
    28.         layerPanel = new LayerPanel(worldWindowGLCanvas);  
    29.         this.add(layerPanel, BorderLayout.WEST);  
    30.   
    31.         this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
    32.         this.setVisible(true);  
    33.         this.setSize(canvasSize);  
    34.     }  
    35.     public static void main(String[] args)  
    36.     {  
    37.         String strTitle = "…………子系统";  
    38.         VGE_GFBasicClass WWRun = new VGE_GFBasicClass();    
    39.         WWRun.setTitle( strTitle + ":" + WWRun.getClass().getName());     
    40.     }  
    41. }  

    直接运行即可,效果图如下:

  • 相关阅读:
    《JavaScript面向对象的编程指南》--读书笔记
    《高性能JavaScript》--读书笔记
    《高性能网站建设指南》--读书笔记
    vertical-align属性探究
    IP地址.md
    Visual Studio Code.md
    ComboBox
    2017 续办上海居住证和积分办理流程
    希腊字母、拉丁字母、Markdown、拼写与读音中英对照表
    Windows Server 2008 添加 IIS 服务
  • 原文地址:https://www.cnblogs.com/telwanggs/p/6769684.html
Copyright © 2011-2022 走看看