当前位置: 首页>>代码示例>>Java>>正文


Java VectorLayerRasterizingInfo.setPaintLabels方法代码示例

本文整理汇总了Java中org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo.setPaintLabels方法的典型用法代码示例。如果您正苦于以下问题:Java VectorLayerRasterizingInfo.setPaintLabels方法的具体用法?Java VectorLayerRasterizingInfo.setPaintLabels怎么用?Java VectorLayerRasterizingInfo.setPaintLabels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo的用法示例。


在下文中一共展示了VectorLayerRasterizingInfo.setPaintLabels方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: prepareMap

import org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo; //导入方法依赖的package包/类
private ClientMapInfo prepareMap(GetTileContainer tileContainer, TileMetadata tileMetadata, NamedStyleInfo style) {
	ClientMapInfo mapInfo = new ClientMapInfo();
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(converterService.toDto(tileContainer.getTile().getBounds()));
	mapInfo.setCrs(tileMetadata.getCrs());
	mapRasterizingInfo.setScale(tileMetadata.getScale());
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
	ClientVectorLayerInfo clientVectorLayerInfo = new ClientVectorLayerInfo();
	clientVectorLayerInfo.setServerLayerId(tileMetadata.getLayerId());
	clientVectorLayerInfo.setNamedStyleInfo(style);
	VectorLayerRasterizingInfo vectorLayerRasterizingInfo = new VectorLayerRasterizingInfo();
	vectorLayerRasterizingInfo.setFilter(tileMetadata.getFilter());
	vectorLayerRasterizingInfo.setPaintGeometries(tileMetadata.isPaintGeometries());
	vectorLayerRasterizingInfo.setPaintLabels(tileMetadata.isPaintLabels());
	vectorLayerRasterizingInfo.setFilter(tileMetadata.getFilter());
	vectorLayerRasterizingInfo.setStyle(style);
	clientVectorLayerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, vectorLayerRasterizingInfo);
	mapInfo.getLayers().add(clientVectorLayerInfo);
	return mapInfo;
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:21,代码来源:RasterTileStep.java

示例2: checkOrRender

import org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo; //导入方法依赖的package包/类
protected void checkOrRender(String fileName, boolean paintLabels, boolean paintGeometries, VectorLayer layer,
		NamedStyleInfo styleInfo, Bbox box) throws Exception {

	ClientMapInfo mapInfo = new ClientMapInfo();
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(box);
	mapInfo.setCrs("EPSG:4326");
	mapRasterizingInfo.setScale(1);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
	ClientVectorLayerInfo clientVectorLayerInfo = new ClientVectorLayerInfo();
	clientVectorLayerInfo.setVisible(true);
	clientVectorLayerInfo.setServerLayerId(layer.getId());
	clientVectorLayerInfo.setNamedStyleInfo(styleInfo);
	VectorLayerRasterizingInfo vectorLayerRasterizingInfo = new VectorLayerRasterizingInfo();
	vectorLayerRasterizingInfo.setPaintGeometries(true);
	vectorLayerRasterizingInfo.setPaintLabels(true);
	vectorLayerRasterizingInfo.setStyle(styleInfo);
	clientVectorLayerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, vectorLayerRasterizingInfo);
	mapInfo.getLayers().add(clientVectorLayerInfo);
	new MapAssert(mapInfo).assertEqualImage(fileName, writeImages, DELTA);
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:22,代码来源:ImageServiceSldTest.java

示例3: checkOrRender

import org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo; //导入方法依赖的package包/类
private void checkOrRender(String fileName, boolean paintLabels, boolean paintGeometries, VectorLayer layer,
		NamedStyleInfo styleInfo, Bbox box) throws Exception {

	ClientMapInfo mapInfo = new ClientMapInfo();
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(box);
	mapInfo.setCrs("EPSG:4326");
	mapRasterizingInfo.setScale(1);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
	ClientVectorLayerInfo clientVectorLayerInfo = new ClientVectorLayerInfo();
	clientVectorLayerInfo.setVisible(true);
	clientVectorLayerInfo.setServerLayerId(layer.getId());
	clientVectorLayerInfo.setNamedStyleInfo(styleInfo);
	VectorLayerRasterizingInfo vectorLayerRasterizingInfo = new VectorLayerRasterizingInfo();
	vectorLayerRasterizingInfo.setPaintGeometries(true);
	vectorLayerRasterizingInfo.setPaintLabels(true);
	vectorLayerRasterizingInfo.setStyle(styleInfo);
	clientVectorLayerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, vectorLayerRasterizingInfo);
	mapInfo.getLayers().add(clientVectorLayerInfo);
	new MapAssert(mapInfo).assertEqualImage(fileName, writeImages, DELTA);
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:22,代码来源:ImageServiceVectorTileTest.java

示例4: build

import org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo; //导入方法依赖的package包/类
@Override
public ClientLayerInfo build(MapPresenter mapPresenter, Layer layer, Bbox worldBounds, double resolution) {
	VectorServerLayer vectorLayer = (VectorServerLayer) layer;
	VectorLayerRasterizingInfo vectorRasterizingInfo = new VectorLayerRasterizingInfo();
	vectorRasterizingInfo.setPaintGeometries(true);
	vectorRasterizingInfo.setPaintLabels(vectorLayer.isLabeled());
	vectorRasterizingInfo.setShowing(layer.isShowing());
	ClientVectorLayerInfo layerInfo = (ClientVectorLayerInfo) vectorLayer.getLayerInfo();
	vectorRasterizingInfo.setStyle(layerInfo.getNamedStyleInfo());
	if (!vectorLayer.getSelectedFeatures().isEmpty()) {
		Collection<Feature> selectedFeatures = vectorLayer.getSelectedFeatures();
		Iterator<Feature> iterator = selectedFeatures.iterator();
		List<String> featureIds = new ArrayList<String>(selectedFeatures.size());
		while (iterator.hasNext()) {
			Feature feature = iterator.next();
			featureIds.add(feature.getId());
		}
		vectorRasterizingInfo.setSelectedFeatureIds(featureIds.toArray(new String[selectedFeatures.size()]));
		ClientMapInfo mapInfo = mapPresenter.getConfiguration().getHintValue(GeomajasServerExtension.MAPINFO);
		FeatureStyleInfo selectStyle;
		switch (layerInfo.getLayerType()) {
			case GEOMETRY:
			case LINESTRING:
			case MULTILINESTRING:
				selectStyle = mapInfo.getLineSelectStyle();
				break;
			case MULTIPOINT:
			case POINT:
				selectStyle = mapInfo.getPointSelectStyle();
				break;
			case MULTIPOLYGON:
			case POLYGON:
				selectStyle = mapInfo.getPolygonSelectStyle();
				break;
			default:
				throw new IllegalArgumentException("Unknown layer type " + layerInfo.getLayerType());
		}
		selectStyle.applyDefaults();
		RuleInfo selectionRule = StyleUtil.createRule(layerInfo.getLayerType(), selectStyle);
		vectorRasterizingInfo.setSelectionRule(selectionRule);
	}
	layerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, vectorRasterizingInfo);
	return layerInfo;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:45,代码来源:VectorServerLayerBuilder.java


注:本文中的org.geomajas.plugin.rasterizing.command.dto.VectorLayerRasterizingInfo.setPaintLabels方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。