當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。