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

Java VectorTileLayer类代码示例

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

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



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

示例1: onCreate

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_map);

	Map map = this.map();

	VectorTileLayer baseLayer = map.setBaseMap(new OSciMap4TileSource());
	map.layers().add(new BuildingLayer(map, baseLayer));
	map.layers().add(new LabelLayer(map, baseLayer));
	map.setTheme(VtmThemes.DEFAULT);

	//mMap.setMapPosition(49.417, 8.673, 1 << 17);
	map.setMapPosition(53.5620092, 9.9866457, 1 << 16);

	//	mMap.layers().add(new TileGridLayer(mMap));
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:17,代码来源:TestActivity.java


示例2: createLayers

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
@Override
public void createLayers() {

	UrlTileSource tileSource = OSciMap4TileSource.builder()
	    //.url("http://vector.dev.mapzen.com/osm/all")
	    .url("http://vector.mapzen.com/osm/all")
	    .zoomMax(18)
	    .httpFactory(new OkHttpEngine.OkHttpFactory())
	    .build();

	VectorTileLayer l = mMap.setBaseMap(tileSource);

	loadTheme();

	mMap.layers().add(new BuildingLayer(mMap, l));
	mMap.layers().add(new LabelLayer(mMap, l));

	mMap.setMapPosition(53.08, 8.82, 1 << 17);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:20,代码来源:MapzenTest.java


示例3: createLayers

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
@Override
public void createLayers() {
	MapRenderer.setBackgroundColor(0xff888888);

	mMap.setMapPosition(53.072, 8.80, 1 << 15);
	// mMap.setMapPosition(52.5, 13.3, 1 << 15);

	MapFileTileSource tileSource = new MapFileTileSource();
	tileSource.setMapFile("/home/jeff/Downloads/bremen.map");

	VectorTileLayer l = mMap.setBaseMap(tileSource);

	mMap.layers().add(new BuildingLayer(mMap, l));
	mMap.layers().add(new LabelLayer(mMap, l));

	// mMap.setTheme(VtmThemes.DEFAULT);
	// mMap.setTheme(VtmThemes.TRONRENDER);
	mMap.setTheme(VtmThemes.OSMARENDER);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:20,代码来源:MapsforgeTest.java


示例4: onKeyDown

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
@Override
protected boolean onKeyDown(int keycode) {
	VectorTileLayer l = (VectorTileLayer) mMap.layers().get(1);
	RenderTheme t = (RenderTheme) l.getTheme();

	if (keycode == Input.Keys.NUM_1) {
		mSaturation += 0.1;
		t.traverseRules(new SaturateLineStyles(mSaturation, true, true, true));
		t.updateStyles();
		mMap.render();
		return true;
	}
	if (keycode == Input.Keys.NUM_2) {
		mSaturation -= 0.1;
		t.traverseRules(new SaturateLineStyles(mSaturation, true, true, true));
		t.updateStyles();
		mMap.render();
		return true;
	}

	return super.onKeyDown(keycode);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:23,代码来源:RuleVisitorTest.java


示例5: createLayers

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
@Override
public void createLayers() {
	MapRenderer.setBackgroundColor(0xf0f0f0);

	TileSource ts = new OSciMap4TileSource();
	VectorTileLayer l = mMap.setBaseMap(ts);

	mMap.setTheme(VtmThemes.DEFAULT);
	RenderTheme t = (RenderTheme) l.getTheme();
	mTheme = t;
	//t.traverseRules(new DesaturateAreaStyles());
	//t.traverseRules(new DesaturateLineStyles());
	t.traverseRules(new SaturateLineStyles(0.5, true, true, true));
	t.updateStyles();

	//mMap.setMapPosition(7.707, 81.689, 1 << 16);

	mMap.setMapPosition(53.08, 8.82, 1 << 16);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:20,代码来源:RuleVisitorTest.java


示例6: createApplication

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
@Override
protected IOSApplication createApplication() {
	IOSApplicationConfiguration config = new IOSApplicationConfiguration();
	config.orientationLandscape = true;
	config.orientationPortrait = true;
	config.stencilFormat = GLKViewDrawableStencilFormat._8;

	return new IOSApplication(new GdxMap() {
		@Override
		public void createLayers() {
			TileSource tileSource = new OSciMap4TileSource();

			//initDefaultLayers(tileSource, false,true, false);
			VectorTileLayer l = mMap.setBaseMap(tileSource);
			mMap.setTheme(VtmThemes.NEWTRON);
			mMap.layers().add(new BuildingLayer(mMap, l));
			mMap.layers().add(new LabelLayer(mMap, l));

			// mMap.getLayers().add(new GenericLayer(mMap, new
			// GridRenderer(1,new Line(Color.LTGRAY, 1.2f),null)));

			mMap.setMapPosition(53.1, 8.8, 1 << 14);
		}

	}, config);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:27,代码来源:RobovmLauncher.java


示例7: initialize

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


示例8: __constructor__

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
public void __constructor__(Map map, TileManager tileManager,
        VectorTileRenderer renderer, int numLoaders) {
    field("mTileLoader").ofType(TileLoader[].class).in(realVectorTileLayer)
            .set(new TileLoader[0]);
    field("mLoaderThemeHooks").ofType(VectorTileLayer.TileLoaderThemeHook[].class)
            .in(realVectorTileLayer).set(new VectorTileLayer.TileLoaderThemeHook[0]);
    field("mLoaderProcessHooks").ofType(VectorTileLayer.TileLoaderProcessHook[].class)
            .in(realVectorTileLayer).set(new VectorTileLayer.TileLoaderProcessHook[0]);
}
 
开发者ID:mapzen,项目名称:open,代码行数:10,代码来源:ShadowVectorTileLayer.java


示例9: setBaseMap

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
/**
 * Create OsmTileLayer with given TileSource and
 * set as base map (layer 1)
 * 
 * TODO deprecate
 */
public VectorTileLayer setBaseMap(TileSource tileSource) {
	VectorTileLayer l = new OsmTileLayer(this);
	l.setTileSource(tileSource);
	setBaseMap(l);
	return l;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:13,代码来源:Map.java


示例10: setTheme

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
public void setTheme(IRenderTheme theme) {
	if (theme == null) {
		throw new IllegalArgumentException("Theme cannot be null.");
	}

	if (mBaseLayer == null) {
		log.warn("No base layer set.");
	} else if (mBaseLayer instanceof VectorTileLayer) {
		((VectorTileLayer) mBaseLayer).setRenderTheme(theme);
	}

	MapRenderer.setBackgroundColor(theme.getMapBackground());

	clearMap();
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:16,代码来源:Map.java


示例11: LabelLayer

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
public LabelLayer(Map map, VectorTileLayer l) {
	super(map);
	l.getManager().events.bind(this);
	l.addHook(new LabelTileLoaderHook());

	mLabelPlacer = new LabelPlacement(map, l.tileRenderer());
	mWorker = new Worker(map);
	mRenderer = new TextRenderer(mWorker);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:10,代码来源:LabelLayer.java


示例12: BuildingLayer

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
public BuildingLayer(Map map, VectorTileLayer tileLayer, int zoomMin, int zoomMax) {

		super(map);

		tileLayer.addHook(this);

		mRenderer = new BuildingRenderer(tileLayer.tileRenderer(),
		                                 zoomMin, zoomMax,
		                                 false, TRANSLUCENT);
		if (POST_AA)
			mRenderer = new OffscreenRenderer(Mode.SSAO_FXAA, mRenderer);
	}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:13,代码来源:BuildingLayer.java


示例13: onActivityResult

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {

	if (requestCode == SELECT_MAP_FILE) {
		if (resultCode != RESULT_OK || intent == null)
			return;
		if (intent.getStringExtra(FilePicker.SELECTED_FILE) == null)
			return;

		mTileSource = new MapFileTileSource();
		String file = intent.getStringExtra(FilePicker.SELECTED_FILE);
		if (mTileSource.setMapFile(file)) {

			VectorTileLayer l = mMap.setBaseMap(mTileSource);
			mMap.setTheme(VtmThemes.DEFAULT);

			mMap.layers().add(new BuildingLayer(mMap, l));
			mMap.layers().add(new LabelLayer(mMap, l));

			MapInfo info = mTileSource.getMapInfo();
			if (info.boundingBox != null) {
				MapPosition pos = new MapPosition();
				pos.setByBoundingBox(info.boundingBox,
				                     Tile.SIZE * 4,
				                     Tile.SIZE * 4);
				mMap.setMapPosition(pos);
				Samples.log.debug("set position {}", pos);
			} else if (info.mapCenter != null) {

				double scale = 1 << 8;
				if (info.startZoomLevel != null)
					scale = 1 << info.startZoomLevel.intValue();

				mMap.setMapPosition(info.mapCenter.getLatitude(),
				                    info.mapCenter.getLongitude(),
				                    scale);
			}
		}
	}
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:41,代码来源:MapsforgeMapActivity.java


示例14: createLayers

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
@Override
public void createLayers() {
	mMap.setMapPosition(53.08, 8.83, 1 << 14);

	// TileSource tileSource = new OSciMap4TileSource();

	MapFileTileSource tileSource = new MapFileTileSource();
	// tileSource.setMapFile("/home/jeff/src/vtm/Freizeitkarte_DEU_NW.map");
	tileSource.setMapFile("/home/jeff/germany.map");

	VectorTileLayer l = mMap.setBaseMap(tileSource);
	mapLayer = l;

	// mMap.getLayers().add(new BuildingLayer(mMap, l.getTileLayer()));
	mMap.layers().add(new LabelLayer(mMap, l));

	try {
		IRenderTheme theme = ThemeLoader
		    .load("themes/freizeitkarte/theme.xml");
		// IRenderTheme theme =
		// ThemeLoader.load("themes/elevate/theme.xml");
		// IRenderTheme theme = ThemeLoader.load("themes/vmap/theme.xml");
		l.setRenderTheme(theme);
		MapRenderer.setBackgroundColor(theme.getMapBackground());
	} catch (FileNotFoundException e) {
		e.printStackTrace();
	}

	// mMap.getLayers().add(new GenericLayer(mMap, new MeshRenderer()));
	// mMap.getLayers().add(new GenericLayer(mMap, new GridRenderer()));
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:32,代码来源:ExternalRenderThemeTest.java


示例15: createLayers

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
@Override
public void createLayers() {
	MapRenderer.setBackgroundColor(0xff888888);

	mMap.setMapPosition(53.1, 8.8, 1 << 15);

	TileSource ts = new OSciMap4TileSource();
	// initDefaultLayers(ts, false, false, false);

	VectorTileLayer mMapLayer = mMap.setBaseMap(ts);
	mMap.setTheme(VtmThemes.DEFAULT);
	// mMap.setTheme(VtmThemes.TRONRENDER);

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

	// mMap.getLayers().add(new GenericLayer(mMap, new GridRenderer()));

	// ts = new OSciMap4TileSource("http://opensciencemap.org/tiles/s3db");
	// VectorTileLayer tl = new VectorTileLayer(mMap, 16, 16, 20);
	// tl.setTileSource(ts);
	// tl.setRenderTheme(ThemeLoader.load(VtmThemes.DEFAULT));
	// mMap.getLayers().add(tl);
	// mMap.getLayers().add(new BuildingLayer(mMap, tl.getTileLayer()));

	mMap.layers().add(new Poi3DLayer(mMap, mMapLayer));

	mMap.layers().add(new LabelLayer(mMap, mMapLayer));
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:29,代码来源:Gdx3DTest.java


示例16: createLayers

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
@Override
public void createLayers() {
	Map map = getMap();

	VectorTileLayer l = map.setBaseMap(new OSciMap4TileSource());

	map.layers().add(new BuildingLayer(map, l));
	map.layers().add(new LabelLayer(map, l));

	map.setTheme(VtmThemes.DEFAULT);
	map.setMapPosition(53.075, 8.808, 1 << 17);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:13,代码来源:MapTest.java


示例17: indoorSketch

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
public static void indoorSketch(Map map, String file) {
	MapRenderer.setBackgroundColor(0xff909090);
	VectorTileLayer baseLayer = map.setBaseMap(new OSciMap4TileSource());
	map.layers().add(new BuildingLayer(map, baseLayer));

	VectorDataset data = null;
	try {
		data = JeoTest.readGeoJson(new FileInputStream(new File(file)));
	} catch (FileNotFoundException e) {
		e.printStackTrace();
	}

	Style style = JeoTest.getStyle();
	map.layers().add(new OSMIndoorLayer(map, data, style));
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:16,代码来源:JeoTest.java


示例18: BuildingLabelLayer

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
public BuildingLabelLayer(Map map, VectorTileLayer vectorTileLayer) {
    super(map);
    this.buildingLayer = new BuildingLayer(map, vectorTileLayer);
    this.layers.add(this.buildingLayer);
    this.layers.add(new LabelLayer(map, vectorTileLayer));
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:7,代码来源:CacheboxMapAdapter.java


示例19: createVectorTileLayer

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
protected VectorTileLayer createVectorTileLayer(Map map) {
    OsmTileLayer vectorTileLayer = new OsmTileLayer(map);
    vectorTileLayer.setTileSource(tileSource);
    return vectorTileLayer;
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:6,代码来源:OSciMap.java


示例20: BuildingLayer

import org.oscim.layers.tile.vector.VectorTileLayer; //导入依赖的package包/类
public BuildingLayer(Map map, VectorTileLayer tileLayer) {
    super(map, tileLayer);
}
 
开发者ID:andreynovikov,项目名称:trekarta,代码行数:4,代码来源:BuildingLayer.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java ThreadManager类代码示例发布时间:2022-05-22
下一篇:
Java IUnorderedGroupHelper类代码示例发布时间: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