• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Layer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中gov.nasa.worldwind.layers.Layer的典型用法代码示例。如果您正苦于以下问题:Java Layer类的具体用法?Java Layer怎么用?Java Layer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Layer类属于gov.nasa.worldwind.layers包,在下文中一共展示了Layer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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() );
	}
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:18,代码来源:WWMap.java


示例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);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:17,代码来源:WWMapApp.java


示例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);
	}
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:17,代码来源:WWMapApp.java


示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:21,代码来源:WWMapApp.java


示例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);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:19,代码来源:WWMapApp.java


示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:22,代码来源:WWMapApp.java


示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:21,代码来源:WWPDB.java


示例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; 
	
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:23,代码来源:LayerComposer.java


示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:21,代码来源:LayerComposer.java


示例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; 
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:23,代码来源:LayerComposer.java


示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:21,代码来源:LayerComposer.java


示例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; 
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:21,代码来源:LayerComposer.java


示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:21,代码来源:LayerComposer.java


示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:21,代码来源:LayerComposer.java


示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:21,代码来源:LayerComposer.java


示例16: get512Layer

import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public static Layer get512Layer(XML_Menu tile_menu) {
	Tile512Layer layer = dynamicLayers.get(tile_menu);
	if (layer != null) return layer;
	
	LayerSetDetails lsd = LayerSetDetails.levelsFromXML_Menu(tile_menu);
	if (lsd == null) return null;
	layer = new Tile512Layer( lsd );
	layer.setName(tile_menu.name);
	layer.setInfoURL(tile_menu.infoURLString);
	layer.setLegendURL(tile_menu.legend);
	
	double wesn[] = new double[4];
	String[] s = tile_menu.wesn.split(",");
	for (int i = 0; i < 4; i++)
		try {
			wesn[i] = Float.parseFloat(s[i]);
		} catch (NumberFormatException ex) {
			wesn = null;
			break;
		}

	layer.setWESN(wesn);
	dynamicLayers.put(tile_menu, layer);
	
	return layer;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:27,代码来源:LayerComposer.java


示例17: TellervoLayerManagerLayer

import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
public TellervoLayerManagerLayer(WorldWindow wwd, LayerList visibleLayers)
{
    if (wwd == null)
    {
        String msg = Logging.getMessage("nullValue.WorldWindow");
        Logging.logger().severe(msg);
        throw new IllegalArgumentException(msg);
    }

    this.wwd = wwd;
    
    for(Layer layer : visibleLayers)
    {
    	this.visibleLayerNames.add(layer.getName());
    }
    
    this.initialize();
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:19,代码来源:TellervoLayerManagerLayer.java


示例18: addLayers

import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
private void addLayers() {
   	
   	for(int i = 0;i<Constants.layers.length;i++){
   		File xml = new File(getExternalCacheDir()+"/"+Constants.URLWORLD+Constants.layers[i]+"/",Constants.layers[i]+".xml");
   		if(xml.exists()){
   			Layer lyr=createLayer(xml.getAbsolutePath());
			if(null!=lyr){
    			lyr.setName(Constants.layers[i]);
    			lyr.setNetworkRetrievalEnabled(false);
    			if(!layersEnabled[i]){
					lyr.setEnabled(false);
				}
				wwd.getModel().getLayers().addIfAbsent(lyr);
			}
   		}else{
   			removeLayer(Constants.layers[i]);
   		}
   	}
	
}
 
开发者ID:TrilogisIT,项目名称:FAO_Application,代码行数:21,代码来源:WorldWindActivity.java


示例19: fill

import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
protected void fill(WorldWindow wwd)
{
    // Populate this layer manager with an entry for each layer in the WorldWindow's layer list.

    if (this.isUpToDate(wwd))
        return;

    // First remove all the existing entries.
    this.layerPanels.clear();
    this.layerNamesPanel.removeAll();

    // Fill the layers panel with the titles of all layers in the world window's current model.
    for (Layer layer : wwd.getModel().getLayers())
    {
        if (layer.getValue(AVKey.IGNORE) != null)
            continue;

        GeneralLayerPanel layerPanel = new GeneralLayerPanel(wwd, layer);
        this.layerNamesPanel.add(layerPanel);
        this.layerPanels.add(layerPanel);
    }

    this.updateLayerActivity(wwd);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:25,代码来源:LayerManagerPanel.java


示例20: fill

import gov.nasa.worldwind.layers.Layer; //导入依赖的package包/类
private void fill(WorldWindow wwd) {

        // Fill the layers panel with the titles of all layers in the world window's current model.
        for (Layer layer : wwd.getModel().getLayers()) {

            if (layer.getName().equalsIgnoreCase("Atmosphere") || layer.getName().equalsIgnoreCase("World Map") ||
                    layer.getName().equalsIgnoreCase("Scale bar") || layer.getName().equalsIgnoreCase("Compass"))
                continue;

            final LayerAction action = new LayerAction(layer, wwd, layer.isEnabled());
            final JCheckBox jcb = new JCheckBox(action);
            jcb.setSelected(action.selected);
            this.layersPanel.add(jcb);

            if (defaultFont == null) {
                this.defaultFont = jcb.getFont();
            }
        }
    }
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:20,代码来源:LayerPanel.java



注:本文中的gov.nasa.worldwind.layers.Layer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ECField类代码示例发布时间:2022-05-21
下一篇:
Java OtrCryptoEngineImpl类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap