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

Java Layer类代码示例

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

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



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

示例1: setBuildingLayerEnabled

import org.oscim.layers.Layer; //导入依赖的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: removeSourceFromMap

import org.oscim.layers.Layer; //导入依赖的package包/类
private void removeSourceFromMap(FileDataSource source) {
    for (Waypoint waypoint : source.waypoints) {
        removeWaypointMarker(waypoint);
        mTotalDataItems--;
    }
    for (Iterator<Layer> i = mMap.layers().iterator(); i.hasNext(); ) {
        Layer layer = i.next();
        if (!(layer instanceof TrackLayer))
            continue;
        if (source.tracks.contains(((TrackLayer) layer).getTrack())) {
            i.remove();
            layer.onDetach();
            mTotalDataItems--;
        }
    }
}
 
开发者ID:andreynovikov,项目名称:trekarta,代码行数:17,代码来源:MainActivity.java


示例3: onKeyDown

import org.oscim.layers.Layer; //导入依赖的package包/类
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
        if (mMap.getEventLayer().moveEnabled()) {
            AbstractMapEventLayer eventLayer = mMap.getEventLayer();
            eventLayer.enableMove(false);
            eventLayer.enableRotation(false);
            eventLayer.enableTilt(false);
            eventLayer.enableZoom(false);
            mCrosshairLayer.lock(mColorAccent);
            mPositionLocked = true;
        }
        return true;
    }
    if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
        for (Layer layer : mMap.layers()) {
            if (layer instanceof TrackLayer || layer instanceof MapObjectLayer || layer instanceof MarkerLayer)
                layer.setEnabled(false);
        }
        mMap.updateMap(true);
        return true;
    }
    return super.onKeyDown(keyCode, event);
}
 
开发者ID:andreynovikov,项目名称:trekarta,代码行数:25,代码来源:MainActivity.java


示例4: onKeyUp

import org.oscim.layers.Layer; //导入依赖的package包/类
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
    if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
        AbstractMapEventLayer eventLayer = mMap.getEventLayer();
        eventLayer.enableMove(true);
        eventLayer.enableRotation(true);
        eventLayer.enableTilt(true);
        eventLayer.enableZoom(true);
        mCrosshairLayer.unlock();
        mPositionLocked = false;
        return true;
    }
    if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
        for (Layer layer : mMap.layers()) {
            if (layer instanceof TrackLayer || layer instanceof MapObjectLayer || layer instanceof MarkerLayer)
                layer.setEnabled(true);
        }
        mMap.updateMap(true);
        return true;
    }
    return super.onKeyUp(keyCode, event);
}
 
开发者ID:andreynovikov,项目名称:trekarta,代码行数:23,代码来源:MainActivity.java


示例5: set

import org.oscim.layers.Layer; //导入依赖的package包/类
@Override
public synchronized Layer set(int index, Layer layer) {
	if (mLayerList.contains(layer))
		throw new IllegalArgumentException("layer added twice");

	mDirtyLayers = true;
	Layer remove = mLayerList.set(index, layer);

	// unbind replaced layer
	if (remove instanceof UpdateListener)
		mMap.events.unbind((UpdateListener) remove);
	if (remove instanceof InputListener)
		mMap.input.unbind((InputListener) remove);

	return remove;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:17,代码来源:Layers.java


示例6: getLayer

import org.oscim.layers.Layer; //导入依赖的package包/类
@Override
public Layer getLayer(Map map) {
    if (vectorTileLayer == null) vectorTileLayer = createVectorTileLayer(map);
    GroupLayer layer = new GroupLayer(map);
    layer.layers.add(new BuildingLayer(map, vectorTileLayer));
    layer.layers.add(new LabelLayer(map, vectorTileLayer));
    return layer;
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:9,代码来源:AbstractVectorLayer.java


示例7: clearLines

import org.oscim.layers.Layer; //导入依赖的package包/类
public void clearLines() {
    for (Layer layer: map.layers()) {
        if (layer.getClass().equals(PathLayer.class)) {
            map.layers().remove(layer);
        }
    }
}
 
开发者ID:mapzen,项目名称:open,代码行数:8,代码来源:MapController.java


示例8: clearLinesExcept

import org.oscim.layers.Layer; //导入依赖的package包/类
public void clearLinesExcept(ArrayList<PathLayer> layers) {
    for (Layer layer: map.layers()) {
        if (layer.getClass().equals(PathLayer.class)) {
            if (!layers.contains(layer)) {
                map.layers().remove(layer);
            }
        }
    }
}
 
开发者ID:mapzen,项目名称:open,代码行数:10,代码来源:MapController.java


示例9: moveToTop

import org.oscim.layers.Layer; //导入依赖的package包/类
public void moveToTop(Class<?> klass) {
    for (Layer layer: map.layers()) {
        if (layer.getClass().equals(klass)) {
            map.layers().remove(layer);
            map.layers().add(layer);
        }
    }
}
 
开发者ID:mapzen,项目名称:open,代码行数:9,代码来源:MapController.java


示例10: add

import org.oscim.layers.Layer; //导入依赖的package包/类
@Override
public synchronized void add(int index, Layer layer) {
	if (mLayerList.contains(layer))
		throw new IllegalArgumentException("layer added twice");

	if (layer instanceof UpdateListener)
		mMap.events.bind((UpdateListener) layer);

	if (layer instanceof InputListener)
		mMap.input.bind((InputListener) layer);

	mLayerList.add(index, layer);
	mDirtyLayers = true;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:15,代码来源:Layers.java


示例11: destroy

import org.oscim.layers.Layer; //导入依赖的package包/类
void destroy() {
	if (mDirtyLayers)
		updateLayers();

	for (Layer o : mLayers)
		o.onDetach();
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:8,代码来源:Layers.java


示例12: handleGesture

import org.oscim.layers.Layer; //导入依赖的package包/类
boolean handleGesture(Gesture g, MotionEvent e) {
	if (mDirtyLayers)
		updateLayers();

	for (Layer o : mLayers)
		if (o instanceof GestureListener)
			if (((GestureListener) o).onGesture(g, e))
				return true;

	return false;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:12,代码来源:Layers.java


示例13: onDetach

import org.oscim.layers.Layer; //导入依赖的package包/类
public void onDetach() {
	if (mDirtyLayers)
		updateLayers();

	for (Layer o : mLayers)
		o.onDetach();
}
 
开发者ID:opensciencemap,项目名称:vtm-android,代码行数:8,代码来源:LayerManager.java


示例14: onUpdate

import org.oscim.layers.Layer; //导入依赖的package包/类
public void onUpdate(MapPosition mapPosition, boolean changed, boolean clear) {
	if (mDirtyLayers)
		updateLayers();

	for (Layer l : mLayers)
		l.onUpdate(mapPosition, changed, clear);
}
 
开发者ID:opensciencemap,项目名称:vtm-android,代码行数:8,代码来源:LayerManager.java


示例15: destroy

import org.oscim.layers.Layer; //导入依赖的package包/类
public void destroy() {
	if (mDirtyLayers)
		updateLayers();

	for (Layer l : mLayers) {
		l.destroy();
	}
}
 
开发者ID:opensciencemap,项目名称:vtm-android,代码行数:9,代码来源:LayerManager.java


示例16: dispose

import org.oscim.layers.Layer; //导入依赖的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


示例17: getLayer

import org.oscim.layers.Layer; //导入依赖的package包/类
@Override
public Layer getLayer(Map map) {
    return null;
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:5,代码来源:AbstractBitmapLayer.java


示例18: LocationAccuracyRenderer

import org.oscim.layers.Layer; //导入依赖的package包/类
public LocationAccuracyRenderer(Map map, Layer layer) {
    mMap = map;
    mLayer = layer;

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


示例19: addLayer

import org.oscim.layers.Layer; //导入依赖的package包/类
@Export
public static boolean addLayer(Layer l) {
	return mMap.layers().add(l);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:5,代码来源:JsMap.java


示例20: Layers

import org.oscim.layers.Layer; //导入依赖的package包/类
Layers(Map map) {
	mMap = map;
	mLayerList = new CopyOnWriteArrayList<Layer>();
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:5,代码来源:Layers.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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