• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java Layers类的典型用法和代码示例

java 2次浏览

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

Layers类属于org.oscim.map包,在下文中一共展示了Layers类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setBuildingLayerEnabled

点赞 3

import org.oscim.map.Layers; //导入依赖的package包/类
private void setBuildingLayerEnabled(boolean enabled) {
    Layers layers = map.layers();
    for (Layer layer : layers) {
        if (layer instanceof CacheboxMapAdapter.BuildingLabelLayer) {
            log.debug("{} BuildingLayer", enabled ? "Enable" : "Disable");
            ((CacheboxMapAdapter.BuildingLabelLayer) layer).buildingLayer.setEnabled(enabled);
        } else if (layer instanceof GroupLayer) {
            List<Layer> groupLayers = ((GroupLayer) layer).layers;
            for (Layer l : groupLayers) {
                if (l instanceof CenterCrossLayer) {
                    log.debug("{} CenterCrossLayer", enabled ? "Enable" : "Disable");
                    if (enabled) {
                        //check settings
                        l.setEnabled(Settings_Map.ShowMapCenterCross.getValue());
                    } else {
                        l.setEnabled(false);
                    }
                }
            }
        }
    }
}
 

开发者ID:Longri,
项目名称:cachebox3.0,
代码行数:23,
代码来源:MapView.java

示例2: initDefaultLayers

点赞 3

import org.oscim.map.Layers; //导入依赖的package包/类
protected void initDefaultLayers(TileSource tileSource, boolean tileGrid, boolean labels,
        boolean buildings) {
	Layers layers = mMap.layers();

	if (tileSource != null) {
		mMapLayer = mMap.setBaseMap(tileSource);
		mMap.setTheme(VtmThemes.DEFAULT);

		if (buildings)
			layers.add(new BuildingLayer(mMap, mMapLayer));

		if (labels)
			layers.add(new LabelLayer(mMap, mMapLayer));
	}

	if (tileGrid)
		layers.add(new TileGridLayer(mMap));
}
 

开发者ID:opensciencemap,
项目名称:vtm,
代码行数:19,
代码来源:GdxMap.java

示例3: showHideMapObjects

点赞 2

import org.oscim.map.Layers; //导入依赖的package包/类
private void showHideMapObjects(boolean hasBitmapMap) {
    Layers layers = mMap.layers();
    if (hasBitmapMap && mHideMapObjects && layers.contains(mLabelsLayer)) {
        if (mBuildingsLayerEnabled)
            layers.remove(mBuildingsLayer);
        layers.remove(mLabelsLayer);
    }
    if ((!hasBitmapMap || !mHideMapObjects) && !layers.contains(mLabelsLayer)) {
        if (mBuildingsLayerEnabled)
            layers.add(mBuildingsLayer, MAP_3D);
        layers.add(mLabelsLayer, MAP_LABELS);
    }
}
 

开发者ID:andreynovikov,
项目名称:trekarta,
代码行数:14,
代码来源:MainActivity.java

示例4: setupMap_Layers

点赞 2

import org.oscim.map.Layers; //导入依赖的package包/类
private void setupMap_Layers() {

		final Layers layers = mMap.layers();

		// tour
		_layer_Tour = new TourLayer(mMap);
		_layer_Tour.setEnabled(false);
		layers.add(_layer_Tour);

		// building
		_layer_Building = new BuildingLayer(mMap, _layer_BaseMap);
		_layer_Building.setEnabled(false);
		layers.add(_layer_Building);

		// label
		_layer_Label = new LabelLayerMT(mMap, _layer_BaseMap);
		_layer_Label.setEnabled(false);
		layers.add(_layer_Label);

		// marker
		_layer_Marker = new MarkerLayer(mMap, this);
		_layer_Marker.setEnabled(false);
		layers.add(_layer_Marker);

		// scale bar
		_layer_ScaleBar = createLayer_ScaleBar();
		layers.add(_layer_ScaleBar);

		// tile info
		_layer_TileInfo = new TileGridLayerMT(mMap);
		_layer_TileInfo.setEnabled(false);
		layers.add(_layer_TileInfo);
	}
 

开发者ID:wolfgang-ch,
项目名称:mytourbook,
代码行数:34,
代码来源:Map25App.java

示例5: initialize

点赞 2

import org.oscim.map.Layers; //导入依赖的package包/类
private void initialize() {
    ITileCache cache = new SharedTileCache(getContext());
    cache.setCacheSize(512 * (1 << 10));
    OSciMap4TileSource tileSource = new OSciMap4TileSource();
    tileSource.setCache(cache);
    VectorTileLayer baseLayer = map().setBaseMap(tileSource);
    Layers layers = map().layers();
    layers.add(drawables = new ClearableVectorLayer(map()));
    layers.add(labels = new LabelLayer(map(), baseLayer));
    layers.add(buildings = new BuildingLayer(map(), baseLayer));
    layers.add(items = new ItemizedLayer<MarkerItem>(map(), new MarkerSymbol(
            new AndroidBitmap(BitmapFactory.decodeResource(getContext().getResources(), R.drawable.nop)), 0.5F, 1)));
    map().setTheme(MicrogThemes.DEFAULT);
}
 

开发者ID:microg,
项目名称:android_packages_apps_GmsCore,
代码行数:15,
代码来源:BackendMapView.java

示例6: onCreate

点赞 2

import org.oscim.map.Layers; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	Map m = this.map();

	Layers layers = mMap.layers();
	layers.add(new BuildingLayer(mMap, mBaseLayer));
	layers.add(new LabelLayer(mMap, mBaseLayer));
	layers.add(new MapScaleBar(mMapView));

	m.setTheme(VtmThemes.DEFAULT);
}
 

开发者ID:opensciencemap,
项目名称:vtm,
代码行数:13,
代码来源:SimpleMapActivity.java

示例7: onCreate

点赞 2

import org.oscim.map.Layers; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	((SeekBar) findViewById(R.id.seekBarH)).setOnSeekBarChangeListener(this);
	((SeekBar) findViewById(R.id.seekBarS)).setOnSeekBarChangeListener(this);
	((SeekBar) findViewById(R.id.seekBarV)).setOnSeekBarChangeListener(this);

	Layers layers = mMap.layers();
	layers.add(new BuildingLayer(mMap, mBaseLayer));
	layers.add(new LabelLayer(mMap, mBaseLayer));

	mMap.setTheme(VtmThemes.DEFAULT);
}
 

开发者ID:opensciencemap,
项目名称:vtm,
代码行数:14,
代码来源:ThemeStylerActivity.java

示例8: dispose

点赞 2

import org.oscim.map.Layers; //导入依赖的package包/类
@Override
public void dispose() {
    log.debug("Dispose MapView");

    //save last position for next initial
    MapPosition mapPosition = this.map.getMapPosition();
    Settings_Map.lastMapState.setValue(lastMapState.getValues());
    Settings_Map.MapInitLatitude.setValue(mapPosition.getLatitude());
    Settings_Map.MapInitLongitude.setValue(mapPosition.getLongitude());
    Config.AcceptChanges();

    positionChangedHandler.dispose();
    positionChangedHandler = null;

    Layers layers = map.layers();
    for (Layer layer : layers) {
        if (layer instanceof Disposable) {
            ((Disposable) layer).dispose();
        } else if (layer instanceof GroupLayer) {
            for (Layer groupLayer : ((GroupLayer) layer).layers) {
                if (groupLayer instanceof Disposable) {
                    ((Disposable) groupLayer).dispose();
                }
            }
        }
    }

    layers.clear();

    wayPointLayer = null;

    mapInputHandler.clear();
    mapInputHandler = null;

    CacheboxMain.drawMap = false;
    map.clearMap();
    map.destroy();
    TextureBucket.pool.clear();
    TextItem.pool.clear();
    TextureItem.disposeTextures();

    main.mMapRenderer = null;
    map = null;

    //dispose actors
    mapStateButton.dispose();

    infoPanel.dispose();
    Settings_Map.ShowMapCenterCross.removeChangedEventListener(showMapCenterCrossChangedListener);
}
 

开发者ID:Longri,
项目名称:cachebox3.0,
代码行数:51,
代码来源:MapView.java

示例9: layers

点赞 2

import org.oscim.map.Layers; //导入依赖的package包/类
@Export
public static Layers layers() {
	return mMap.layers();
}
 

开发者ID:opensciencemap,
项目名称:vtm,
代码行数:5,
代码来源:JsMap.java

示例10: layers

点赞 1

import org.oscim.map.Layers; //导入依赖的package包/类
public abstract Layers layers(); 

开发者ID:opensciencemap,
项目名称:vtm,
代码行数:2,
代码来源:JsOverlays.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)