本文整理汇总了Java中gov.nasa.worldwind.layers.TiledImageLayer类的典型用法代码示例。如果您正苦于以下问题:Java TiledImageLayer类的具体用法?Java TiledImageLayer怎么用?Java TiledImageLayer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TiledImageLayer类属于gov.nasa.worldwind.layers包,在下文中一共展示了TiledImageLayer类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBlueMarbleMapLayer
import gov.nasa.worldwind.layers.TiledImageLayer; //导入依赖的package包/类
public static Layer getBlueMarbleMapLayer() {
TiledImageLayer layer = (TiledImageLayer) layers.get(BLUEMARBLE_MAP_LAYER);
if (layer != null)
return layer;
layer = new BMNGWMSLayer(); //was BMNGSurfaceLayer()
layer.setRetainLevelZeroTiles(false);
layers.put(BLUEMARBLE_MAP_LAYER, layer);
return layer;
}
示例2: updateLayerActivity
import gov.nasa.worldwind.layers.TiledImageLayer; //导入依赖的package包/类
/**
* Loops through this layer panel's layer/checkbox list and updates the checkbox font to indicate whether the
* corresponding layer was just rendered. This method is called by a rendering listener -- see comment below.
*
* @param wwd the world window.
*/
protected void updateLayerActivity(WorldWindow wwd)
{
for (GeneralLayerPanel layerPanel : this.layerPanels)
{
// The frame timestamp from the layer indicates the last frame in which it rendered something. If that
// timestamp matches the current timestamp of the scene controller, then the layer rendered something
// during the most recent frame. Note that this frame timestamp protocol is only in place by default
// for TiledImageLayer and its subclasses. Applications could, however, implement it for the layers
// they design.
Long layerTimeStamp = (Long) layerPanel.getLayer().getValue(AVKey.FRAME_TIMESTAMP);
Long frameTimeStamp = (Long) wwd.getSceneController().getValue(AVKey.FRAME_TIMESTAMP);
if (layerTimeStamp != null && frameTimeStamp != null
&& layerTimeStamp.longValue() == frameTimeStamp.longValue())
{
// Set the font to bold if the layer was just rendered.
layerPanel.setLayerNameFont(this.boldFont);
}
else if (layerPanel.getLayer() instanceof TiledImageLayer)
{
// Set the font to plain if the layer was not just rendered.
layerPanel.setLayerNameFont(this.plainFont);
}
else if (layerPanel.getLayer().isEnabled())
{
// Set enabled layer types other than TiledImageLayer to bold.
layerPanel.setLayerNameFont(this.boldFont);
}
else if (!layerPanel.getLayer().isEnabled())
{
// Set disabled layer types other than TiledImageLayer to plain.
layerPanel.setLayerNameFont(this.plainFont);
}
}
}