rogene
05-30-2007, 07:17 AM
Veeeery simple little application below. Could anyone tell me why the Political BoundariesLayer won't show?
Thanks!
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.awt.*;
import gov.nasa.worldwind.layers.Earth.*;
import javax.swing.*;
import java.awt.*;
public class FractalDemo extends JFrame {
public FractalDemo() {
// instantiate and add layers
BMNGSurfaceLayer blue = new BMNGSurfaceLayer();
PoliticalBoundariesLayer pb = new PoliticalBoundariesLayer();
LayerList layerList = new LayerList();
layerList.add(blue);
layerList.add(pb);
// instantiate world window and add to contentpane
WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
wwd.setPreferredSize(new Dimension(800, 600));
JPanel mainPanel = new JPanel();
mainPanel.add(wwd);
this.getContentPane().add(mainPanel);
this.pack();
Model m = (Model) WorldWind.createConfigurationComponent(A VKey.MODEL_CLASS_NAME);
m.setLayers(layerList);
wwd.setModel(m);
}
public static void main(String[] args) {
FractalDemo demo = new FractalDemo();
demo.setDefaultCloseOperation(JFrame.EXI T_ON_CLOSE);
demo.setVisible(true);
}
}
Thanks!
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.awt.*;
import gov.nasa.worldwind.layers.Earth.*;
import javax.swing.*;
import java.awt.*;
public class FractalDemo extends JFrame {
public FractalDemo() {
// instantiate and add layers
BMNGSurfaceLayer blue = new BMNGSurfaceLayer();
PoliticalBoundariesLayer pb = new PoliticalBoundariesLayer();
LayerList layerList = new LayerList();
layerList.add(blue);
layerList.add(pb);
// instantiate world window and add to contentpane
WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
wwd.setPreferredSize(new Dimension(800, 600));
JPanel mainPanel = new JPanel();
mainPanel.add(wwd);
this.getContentPane().add(mainPanel);
this.pack();
Model m = (Model) WorldWind.createConfigurationComponent(A VKey.MODEL_CLASS_NAME);
m.setLayers(layerList);
wwd.setModel(m);
}
public static void main(String[] args) {
FractalDemo demo = new FractalDemo();
demo.setDefaultCloseOperation(JFrame.EXI T_ON_CLOSE);
demo.setVisible(true);
}
}