Skip to content

Commit ea5af36

Browse files
committed
Revert SurfaceTextUsage changes.
Reverted the SurfaceTextUsage changes back to its original state. The tests are going to be moved out to a new functional test class.
1 parent 1ff7e0a commit ea5af36

File tree

1 file changed

+5
-39
lines changed

1 file changed

+5
-39
lines changed

src/gov/nasa/worldwindx/examples/SurfaceTextUsage.java

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,9 @@
77
package gov.nasa.worldwindx.examples;
88

99
import gov.nasa.worldwind.Configuration;
10-
import gov.nasa.worldwind.WorldWind;
1110
import gov.nasa.worldwind.avlist.AVKey;
12-
import gov.nasa.worldwind.geom.Angle;
1311
import gov.nasa.worldwind.geom.Position;
1412
import gov.nasa.worldwind.layers.RenderableLayer;
15-
import gov.nasa.worldwind.render.Offset;
16-
import gov.nasa.worldwind.render.PointPlacemark;
17-
import gov.nasa.worldwind.render.PointPlacemarkAttributes;
1813
import gov.nasa.worldwind.render.SurfaceText;
1914

2015
/**
@@ -25,55 +20,26 @@
2520
*/
2621
public class SurfaceTextUsage extends ApplicationTemplate
2722
{
28-
private static Position center = Position.fromDegrees(38.9345, -120.1670, 50000);
29-
3023
public static class AppFrame extends ApplicationTemplate.AppFrame
3124
{
3225
public AppFrame()
3326
{
3427
super(true, true, false);
3528

3629
RenderableLayer layer = new RenderableLayer();
37-
38-
int j = 0;
39-
for (double x = -1.0; x <= 0.0; x += 0.5, j++)
40-
{
41-
for (double y = -1.0; y <= 0.0; y += 0.5, j++)
42-
{
43-
for (int i = 0; i <= 12; i++)
44-
{
45-
double latitude = center.latitude.degrees + ((j - 4) / 5.0);
46-
double longitude = center.longitude.degrees + ((i - 6) / 5.0);
47-
Position position = Position.fromDegrees(latitude, longitude, 0);
48-
49-
SurfaceText surfaceText = new SurfaceText("Test Label Description", position);
50-
surfaceText.setDrawBoundingSectors(true);
51-
surfaceText.setHeading(Angle.fromDegrees(i * 30));
52-
surfaceText.setOffset(Offset.fromFraction(x, y));
53-
layer.addRenderable(surfaceText);
5430

55-
PointPlacemark placemark = new PointPlacemark(position);
56-
placemark.setAltitudeMode(WorldWind.CLAMP_TO_GROUND);
57-
PointPlacemarkAttributes attrs = new PointPlacemarkAttributes();
58-
attrs.setLabelColor("ffffffff");
59-
attrs.setLineColor("ff0000ff");
60-
attrs.setUsePointAsDefaultImage(true);
61-
attrs.setScale(5d);
62-
placemark.setAttributes(attrs);
63-
layer.addRenderable(placemark);
64-
}
65-
}
66-
}
31+
SurfaceText surfaceText = new SurfaceText("Desolation Wilderness", Position.fromDegrees(38.9345, -120.1670, 0));
32+
layer.addRenderable(surfaceText);
6733

6834
this.getWwd().getModel().getLayers().add(layer);
6935
}
7036
}
7137

7238
public static void main(String[] args)
7339
{
74-
Configuration.setValue(AVKey.INITIAL_LATITUDE, center.latitude.degrees);
75-
Configuration.setValue(AVKey.INITIAL_LONGITUDE, center.longitude.degrees);
76-
Configuration.setValue(AVKey.INITIAL_ALTITUDE, center.elevation);
40+
Configuration.setValue(AVKey.INITIAL_LATITUDE, 38.9345);
41+
Configuration.setValue(AVKey.INITIAL_LONGITUDE, -120.1670);
42+
Configuration.setValue(AVKey.INITIAL_ALTITUDE, 50000);
7743

7844
ApplicationTemplate.start("WorldWind Surface Text", AppFrame.class);
7945
}

0 commit comments

Comments
 (0)