我使用WorldWind在Android应用程序中显示一个globe。我设法显示了卫星图像。
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.FrameLayout;
import gov.nasa.worldwind.WorldWindow;
import gov.nasa.worldwind.layer.BackgroundLayer;
import gov.nasa.worldwind.layer.BlueMarbleLandsatLayer;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Create a WorldWindow (a GLSurfaceView)...
WorldWindow wwd = new WorldWindow(getApplicationContext());
// ... and add some map layers
wwd.getLayers().addLayer(new BackgroundLayer());
wwd.getLayers().addLayer(new BlueMarbleLandsatLayer());
// Add the WorldWindow view object to the layout that was reserved for the globe.
FrameLayout globeLayout = (FrameLayout) findViewById(R.id.globe);
globeLayout.addView(wwd);
}
}
从WorldWind网站的例子中,我想在地球上添加地形的高程(浮雕)(以查看山脉,火山......)。 我该怎么办?
谢谢
答案 0 :(得分:0)
我找到了答案,你必须添加这一行
wwd.getGlobe().getElevationModel().addCoverage(new BasicElevationCoverage());