本文整理汇总了Java中gov.nasa.worldwind.layers.Layer类的典型用法代码示例。如果您正苦于以下问题:Java Layer类的具体用法?Java Layer怎么用?Java Layer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Layer类属于gov.nasa.worldwind.layers包,在下文中一共展示了Layer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addOverlay
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
@Override
public void addOverlay( String name, Overlay overlay, int index, String infoURLString, boolean fireChange, XML_Menu xml_item) {
super.addOverlay(name, overlay, index, infoURLString, fireChange, xml_item);
if (overlay instanceof WWOverlay) {
WWOverlay wwOverlay = (WWOverlay)overlay;
Layer layer = wwOverlay.getLayer();
if (layer instanceof WWLayer)
((WWLayer) layer).setInfoURL(infoURLString);
LayerList layers = wwd.getModel().getLayers();
if (layers.contains(layer)) return;
layers.add( layer );
wwd.addSelectListener( wwOverlay.getSelectListener() );
}
}
示例2: updateCreditButtonState
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
protected void updateCreditButtonState() {
LayerList ll = wwModel.getLayers();
for (int i = ll.size() - 1; i >= 0; i--) {
Layer l = ll.get(i);
if (l.isEnabled() && (l.getOpacity() > .2)) {
for (Class<?> c : l.getClass().getInterfaces())
if (c.equals( InfoSupplier.class )) {
((WWMapTools)tools).creditB.setEnabled(true);
return;
}
((WWMapTools)tools).creditB.setEnabled(false);
return;
}
}
((WWMapTools)tools).creditB.setEnabled(false);
}
示例3: setMask
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
@Override
public void setMask(boolean tf) {
if (whichMap != WORLDWIND) {
super.setMask(tf);
return;
}
Layer newLayer = LayerComposer.getGeoMapAppMaskLayer();
if (tf) {
layerManager.addIgnoredLayer(newLayer);
makeLayerVisible(newLayer);
} else {
disposeLayer(GeoMapAppMaskLayer.class);
}
}
示例4: isLayerVisible
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
private boolean isLayerVisible(Class<?> c) {
Layer layer = null;
for (Layer l : wwModel.getLayers())
if (c.isInstance(l)) {
layer = l;
break;
}
if (layer == null)
return false;
if (!layer.isEnabled())
return false;
if (layer.getOpacity() < .3)
return false;
return true;
}
示例5: makeLayerVisible
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public synchronized void makeLayerVisible(Layer newLayer, boolean ignoreLayer) {
if (newLayer == null) return;
if (ignoreLayer)
layerManager.addIgnoredLayer(newLayer);
LayerList ll = wwModel.getLayers();
newLayer.setEnabled(true);
if (newLayer.getOpacity() < .3)
newLayer.setOpacity(1);
ll.remove(newLayer);
ll.add(ll.size(), newLayer);
if (!ignoreLayer)
setLayerManagerVisible(true);
}
示例6: toLayerList
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
private List<ILayer> toLayerList(LayerList ll) {
List<ILayer> layers = new ArrayList<ILayer>();
for (Layer layer : ll) {
WWILayer ilayer = new LayerManager.WWILayer(layer);
if (layer instanceof InfoSupplier) {
String infoURL = ((InfoSupplier) layer).getInfoURL();
ilayer.setInfoURL(infoURL);
}
if (layer instanceof LegendSupplier) {
String legendURL = ((LegendSupplier) layer).getLegendURL();
ilayer.setLegendURL(legendURL);
}
if (layer instanceof WESNSupplier) {
ilayer.setWESN(((WESNSupplier)layer).getWESN());
}
layers.add(ilayer);
}
return layers;
}
示例7: getLayer
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public Layer getLayer() {
if (wwScenceGraph == null) {
wwScenceGraph = new WWSceneGraph();
wwScenceGraph.setName(getDBName());
loadLayer();
}
if (layer == null)
{
layer = new WWLayer(wwScenceGraph) {
public void close() {
((MapApp)map.getApp()).closeDB(WWPDB.this);
}
public Database getDB() {
return WWPDB.this;
}
};
}
return layer;
}
示例8: getGeoidGridLayer
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public static Layer getGeoidGridLayer() {
GridRetriever geoLayer = new GridRetriever() {
public Grid2DOverlay retriveGrid(Rectangle2D tileBounds, int level) {
return SSGridComposer.getGridWW(tileBounds, level, SSGridComposer.GEOID);
}
public float getVEFactor() {
return 5000f;
}
public int getNumLevels() {
return 2;
}
public String getName() {
return org.geomapapp.grid.GridDialog.GEOID;
}
};
GridTileLayer tl = new GridTileLayer(geoLayer, ImageResampler.MERCATOR_TO_GEOGRAPHIC);
tl.setAnnotationFactor(1);
tl.setAnnotationUnits(GridDialog.GRID_UNITS.get(GridDialog.GEOID));
return tl;
}
示例9: getAgeGridLayer
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public static Layer getAgeGridLayer() {
GridTileLayer tl = new GridTileLayer(new GridRetriever() {
public Grid2DOverlay retriveGrid(Rectangle2D tileBounds, int level) {
return SSGridComposer.getGridWW(tileBounds, level, SSGridComposer.AGE);
}
public float getVEFactor() {
return 1f;
}
public int getNumLevels() {
return 2;
}
public String getName() {
return org.geomapapp.grid.GridDialog.AGE;
}
}, ImageResampler.MERCATOR_TO_GEOGRAPHIC);
tl.setAnnotationFactor(1/100f);
tl.setAnnotationUnits(GridDialog.GRID_UNITS.get(GridDialog.AGE));
return tl;
}
示例10: getSpreadingAsymmetryGridLayer
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public static Layer getSpreadingAsymmetryGridLayer() {
System.out.println("y");
GridTileLayer tl = new GridTileLayer(new GridRetriever() {
public Grid2DOverlay retriveGrid(Rectangle2D tileBounds, int level) {
System.out.println("y2");
return SSGridComposer.getGridWW(tileBounds, level, SSGridComposer.SPREADING_ASYMMETRY);
}
public float getVEFactor() {
return 1f;
}
public int getNumLevels() {
return 2;
}
public String getName() {
return org.geomapapp.grid.GridDialog.SPREADING_ASYMMETRY;
}
}, ImageResampler.MERCATOR_TO_GEOGRAPHIC);
tl.setAnnotationFactor(1/100f);
tl.setAnnotationUnits(GridDialog.GRID_UNITS.get(GridDialog.SPREADING_ASYMMETRY));
return tl;
}
示例11: getSpreadingRateGridLayer
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public static Layer getSpreadingRateGridLayer() {
GridTileLayer tl = new GridTileLayer(new GridRetriever() {
public Grid2DOverlay retriveGrid(Rectangle2D tileBounds, int level) {
return SSGridComposer.getGridWW(tileBounds, level, SSGridComposer.SPREADING_RATE);
}
public float getVEFactor() {
return 1f;
}
public int getNumLevels() {
return 2;
}
public String getName() {
return org.geomapapp.grid.GridDialog.SPREADING_RATE;
}
}, ImageResampler.MERCATOR_TO_GEOGRAPHIC);
tl.setAnnotationFactor(1/100f);
tl.setAnnotationUnits(GridDialog.GRID_UNITS.get(GridDialog.SPREADING_RATE));
return tl;
}
示例12: getTopo9GridLayer
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public static Layer getTopo9GridLayer() {
GridTileLayer tl = new GridTileLayer(new GridRetriever() {
public Grid2DOverlay retriveGrid(Rectangle2D tileBounds, int level) {
return SSGridComposer.getGridWW(tileBounds, level, SSGridComposer.TOPO_9);
}
public float getVEFactor() {
return 1;
}
public int getNumLevels() {
return 3;
}
public String getName() {
return org.geomapapp.grid.GridDialog.TOPO_9;
}
}, ImageResampler.MERCATOR_TO_GEOGRAPHIC);
tl.setAnnotationFactor(1);
tl.setAnnotationUnits(GridDialog.GRID_UNITS.get(GridDialog.TOPO_9));
return tl;
}
示例13: getGravityGridLayer
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public static Layer getGravityGridLayer() {
GridTileLayer tl = new GridTileLayer(new GridRetriever() {
public Grid2DOverlay retriveGrid(Rectangle2D tileBounds, int level) {
return SSGridComposer.getGridWW(tileBounds, level, SSGridComposer.GRAVITY);
}
public float getVEFactor() {
return 100f;
}
public int getNumLevels() {
return 3;
}
public String getName() {
return org.geomapapp.grid.GridDialog.GRAVITY;
}
}, ImageResampler.MERCATOR_TO_GEOGRAPHIC);
tl.setAnnotationFactor(1);
tl.setAnnotationUnits(GridDialog.GRID_UNITS.get(GridDialog.GRAVITY));
return tl;
}
示例14: getGravity_18GridLayer
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public static Layer getGravity_18GridLayer() {
GridTileLayer tl = new GridTileLayer(new GridRetriever() {
public Grid2DOverlay retriveGrid(Rectangle2D tileBounds, int level) {
return SSGridComposer.getGridWW(tileBounds, level, SSGridComposer.GRAVITY_18);
}
public float getVEFactor() {
return 100f;
}
public int getNumLevels() {
return 3;
}
public String getName() {
return org.geomapapp.grid.GridDialog.GRAVITY_18;
}
}, ImageResampler.MERCATOR_TO_GEOGRAPHIC);
tl.setAnnotationFactor(1);
tl.setAnnotationUnits(GridDialog.GRID_UNITS.get(GridDialog.GRAVITY_18));
return tl;
}
示例15: getTopoGridLayer
import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public static Layer getTopoGridLayer() {
GridTileLayer tl = new GridTileLayer(new GridRetriever() {
public Grid2DOverlay retriveGrid(Rectangle2D tileBounds, int level) {
return GridComposer.getGridWW(tileBounds, level);
}
public float getVEFactor() {
return 1f;
}
public int getNumLevels() {
return 7;
}
public String getName() {
return org.geomapapp.grid.GridDialog.DEM;
}
}, ImageResampler.MERCATOR_TO_GEOGRAPHIC);
tl.setAnnotationFactor(1);
tl.setAnnotationUnits(GridDialog.GRID_UNITS.get(GridDialog.TOPO_9));
return tl;
}