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


Java MapRasterizingInfo.setBounds方法代码示例

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


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

示例1: buildMap

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
private MapRasterizingInfo buildMap(MapPresenter mapPresenter) {
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	ViewPort viewPort = mapPresenter.getViewPort();
	mapRasterizingInfo.setBounds(viewPort.getBounds());
	mapRasterizingInfo.setScale(1 / viewPort.getResolution());
	mapRasterizingInfo.setTransparent(true);
	LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo();
	legendRasterizingInfo.setTitle("Legend");
	FontStyleInfo font = new FontStyleInfo();
	font.applyDefaults();
	legendRasterizingInfo.setFont(font);

	mapRasterizingInfo.setLegendRasterizingInfo(legendRasterizingInfo);

	// Support for selection of layer object : create container for info on selected features;
	// store the selections layer per layer
	List<ClientLayerInfo> selectedLayers = new ArrayList<ClientLayerInfo>();
	mapRasterizingInfo.setExtraLayers(selectedLayers);

	ClientMapInfo mapInfo = mapPresenter.getConfiguration().getHintValue(GeomajasServerExtension.MAPINFO);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
	// Note: mapRasterizingInfo at this time is pretty empty (rastering info for
	// layers not yet filled in)
	return mapRasterizingInfo;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:26,代码来源:DefaultPrintableMapBuilder.java

示例2: render

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Override
public void render(PdfContext context) {
	try {
		bbox = createBbox();
		MapRasterizingInfo mapRasterizingInfo = (MapRasterizingInfo) clientMapInfo
				.getWidgetInfo(MapRasterizingInfo.WIDGET_KEY);
		mapRasterizingInfo.setBounds(new Bbox(bbox.getMinX(), bbox.getMinY(), bbox.getWidth(), bbox.getHeight()));
		mapRasterizingInfo.setScale(getMap().getPpUnit());
		Graphics2D graphics = context.getGraphics2D(getBounds());
		imageService.writeMap(graphics, clientMapInfo);
		graphics.dispose();
	} catch (Exception e) {
		log.warn("Failed to render rasterized layers", e);
	}
	super.render(context);
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:17,代码来源:RasterizedLayersComponentImpl.java

示例3: prepareMap

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的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

示例4: checkOrRender

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的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

示例5: testOneVectorLayer

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Test
public void testOneVectorLayer() throws Exception {
	ClientMapInfo mapInfo = new ClientMapInfo();
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(new Bbox(-80, -50, 100, 100));
	mapInfo.setCrs("EPSG:4326");
	mapRasterizingInfo.setScale(1);
	mapRasterizingInfo.setTransparent(true);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
	ClientVectorLayerInfo clientBeansPointLayerInfo = new ClientVectorLayerInfo();
	clientBeansPointLayerInfo.setServerLayerId(layerBeansPoint.getId());
	VectorLayerRasterizingInfo layerRasterizingInfo = new VectorLayerRasterizingInfo();
	layerRasterizingInfo.setStyle(layerBeansPointStyleInfo);
	clientBeansPointLayerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, layerRasterizingInfo);
	mapInfo.getLayers().add(clientBeansPointLayerInfo);
	new MapAssert(mapInfo).assertEqualImage("onevector.png", writeImages, DELTA);
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:18,代码来源:ImageServiceMapTest.java

示例6: testTwoVectorLayers

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Test
public void testTwoVectorLayers() throws Exception {
	ClientMapInfo mapInfo = new ClientMapInfo();
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(new Bbox(-80, -50, 100, 100));
	mapInfo.setCrs("EPSG:4326");
	mapRasterizingInfo.setScale(1);
	mapRasterizingInfo.setTransparent(true);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

	ClientVectorLayerInfo cl1 = new ClientVectorLayerInfo();
	cl1.setServerLayerId(layerBeansPoint.getId());
	VectorLayerRasterizingInfo lr1 = new VectorLayerRasterizingInfo();
	lr1.setStyle(layerBeansPointStyleInfo);
	cl1.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr1);
	mapInfo.getLayers().add(cl1);

	ClientVectorLayerInfo cl2 = new ClientVectorLayerInfo();
	cl2.setServerLayerId(layerBeansMultiLine.getId());
	VectorLayerRasterizingInfo lr2 = new VectorLayerRasterizingInfo();
	lr2.setStyle(layerBeansMultiLineStyleInfo);
	cl2.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr2);
	mapInfo.getLayers().add(cl2);
	new MapAssert(mapInfo).assertEqualImage("twovector.png", writeImages, DELTA);
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:26,代码来源:ImageServiceMapTest.java

示例7: testDpi

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Test
public void testDpi() throws Exception {
	ClientMapInfo mapInfo = new ClientMapInfo();
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(new Bbox(-80, -50, 100, 100));
	mapInfo.setCrs("EPSG:4326");
	// increase scale by factor 5
	mapRasterizingInfo.setScale(5);
	// increase dpi accordingly so labels stay the same size
	mapRasterizingInfo.setDpi(96*5);
	mapRasterizingInfo.setTransparent(true);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
	ClientVectorLayerInfo clientBeansPointLayerInfo = new ClientVectorLayerInfo();
	clientBeansPointLayerInfo.setServerLayerId(layerBeansPoint.getId());
	VectorLayerRasterizingInfo layerRasterizingInfo = new VectorLayerRasterizingInfo();
	layerRasterizingInfo.setStyle(layerBeansPointStyleInfo);
	clientBeansPointLayerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, layerRasterizingInfo);
	mapInfo.getLayers().add(clientBeansPointLayerInfo);
	new MapAssert(mapInfo).assertEqualImage("dpi.png", writeImages, DELTA);
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:21,代码来源:ImageServiceMapTest.java

示例8: testGraphics2D

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Test
public void testGraphics2D() throws Exception {
	ClientMapInfo mapInfo = new ClientMapInfo();
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(new Bbox(-80, -50, 100, 100));
	mapInfo.setCrs("EPSG:4326");
	mapRasterizingInfo.setScale(1);
	mapRasterizingInfo.setTransparent(true);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
	ClientVectorLayerInfo clientBeansPointLayerInfo = new ClientVectorLayerInfo();
	clientBeansPointLayerInfo.setServerLayerId(layerBeansPoint.getId());
	VectorLayerRasterizingInfo layerRasterizingInfo = new VectorLayerRasterizingInfo();
	layerRasterizingInfo.setStyle(layerBeansPointStyleInfo);
	clientBeansPointLayerInfo.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, layerRasterizingInfo);
	mapInfo.getLayers().add(clientBeansPointLayerInfo);
	BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
	RenderingHints renderingHints = new Hints();
	renderingHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
	Graphics2D graphics2d = image.createGraphics();
	graphics2d.setRenderingHints(renderingHints);
	imageService.writeMap(graphics2d, mapInfo);
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	imageService.writeMap(baos, mapInfo);
	BufferedImage image2 = ImageIO.read(new ByteArrayInputStream(baos.toByteArray()));
	Assert.assertArrayEquals(image2.getRGB(0, 0, 100, 100, null, 0, 100),image.getRGB(0, 0, 100, 100, null, 0, 100));
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:27,代码来源:ImageServiceMapTest.java

示例9: testGeometry

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Test
public void testGeometry() throws Exception {
	ClientMapInfo mapInfo = new ClientMapInfo();
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(new Bbox(-80, -50, 100, 100));
	mapInfo.setCrs("EPSG:4326");
	mapRasterizingInfo.setScale(1);
	mapRasterizingInfo.setTransparent(true);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

	ClientGeometryLayerInfo geo = new ClientGeometryLayerInfo();
	Geometry point = new Geometry(Geometry.POINT, 4326, 5);
	point.setCoordinates(new Coordinate[] { new Coordinate(20, 50) });
	geo.getGeometries().add(point);
	geo.setStyle(styleConverterService.convert(layerBeansPointStyleInfo, GeometryDirectLayer.DEFAULT_GEOMETRY_NAME));
	geo.setLayerType(LayerType.POINT);
	mapInfo.getLayers().add(geo);
	new MapAssert(mapInfo).assertEqualImage("geometry.png", writeImages, DELTA);
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:20,代码来源:ImageServiceMapTest.java

示例10: testOneRasterLayer

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Test
public void testOneRasterLayer() throws Exception {
	ClientMapInfo mapInfo = new ClientMapInfo();
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(new Bbox(-180, -90, 360, 180));
	mapInfo.setCrs("EPSG:4326");
	mapRasterizingInfo.setScale(2);
	mapRasterizingInfo.setTransparent(true);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

	ClientRasterLayerInfo cl1 = new ClientRasterLayerInfo();
	cl1.setServerLayerId(layerBluemarble.getId());
	RasterLayerRasterizingInfo rr1 = new RasterLayerRasterizingInfo();
	rr1.setCssStyle("opacity:0.5");
	cl1.getWidgetInfo().put(RasterLayerRasterizingInfo.WIDGET_KEY, rr1);
	mapInfo.getLayers().add(cl1);
	new MapAssert(mapInfo).assertEqualImage("oneraster.png", writeImages, DELTA);
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:19,代码来源:ImageServiceMapTest.java

示例11: checkOrRender

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的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

示例12: testPolygon

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Test
public void testPolygon() throws Exception {
	ClientGeometryLayerInfo geo = new ClientGeometryLayerInfo();
	geo.getGeometries().add(createPolygon());
	geo.setStyle(createPolygonStyle());
	geo.setLayerType(LayerType.POLYGON);

	ClientMapInfo mapInfo = new ClientMapInfo();
	mapInfo.setCrs("EPSG:4326");
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(new Bbox(0, 0, 100, 100));
	mapRasterizingInfo.setScale(1);
	mapRasterizingInfo.setTransparent(true);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

	DefaultMapContext mapContext = new DefaultMapContext();
	mapContext.setCoordinateReferenceSystem(geoService.getCrs2("EPSG:4326"));
	mapContext.getViewport().setBounds(
			new ReferencedEnvelope(0, 100, 0, 100, mapContext.getCoordinateReferenceSystem()));
	mapContext.getViewport().setCoordinateReferenceSystem(mapContext.getCoordinateReferenceSystem());
	mapContext.getViewport().setScreenArea(new Rectangle(0, 0, 100, 100));
	GeometryDirectLayer layer = (GeometryDirectLayer) layerFactory.createLayer(mapContext, geo);
	BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR);
	layer.draw(image.createGraphics(), mapContext, mapContext.getViewport());
	new DirectLayerAssert(layer, mapContext).assertEqualImage("polygon.png", writeImages, DELTA);
	mapContext.dispose();
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:28,代码来源:GeometryDirectLayerTest.java

示例13: testOneOfEach

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Test
public void testOneOfEach() throws Exception {
	ClientWorldPaintableLayerInfo wp = new ClientWorldPaintableLayerInfo();
	wp.getPaintables().add(createPoint());
	wp.getPaintables().add(createLine());
	wp.getPaintables().add(createPolygon());
	wp.getPaintables().add(createText());
	wp.getPaintables().add(createImage());
	wp.getPaintables().add(createEllipse());
	wp.getPaintables().add(createRectangle());

	ClientMapInfo mapInfo = new ClientMapInfo();
	mapInfo.setCrs("EPSG:4326");
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(new Bbox(0, 0, size, size));
	mapRasterizingInfo.setScale(1);
	mapRasterizingInfo.setTransparent(true);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

	DefaultMapContext mapContext = new DefaultMapContext();
	mapContext.setCoordinateReferenceSystem(geoService.getCrs2("EPSG:4326"));
	mapContext.getViewport().setBounds(
			new ReferencedEnvelope(0, size, 0, size, mapContext.getCoordinateReferenceSystem()));
	mapContext.getViewport().setCoordinateReferenceSystem(mapContext.getCoordinateReferenceSystem());
	mapContext.getViewport().setScreenArea(new Rectangle(0, 0, size, size));
	WorldPaintableDirectLayer layer = (WorldPaintableDirectLayer) layerFactory.createLayer(mapContext, wp);
	BufferedImage image = new BufferedImage(size, size, BufferedImage.TYPE_4BYTE_ABGR);
	layer.draw(image.createGraphics(), mapContext, mapContext.getViewport());
	new DirectLayerAssert(layer, mapContext).assertEqualImage("worldpaintable-mix.png", writeImages, DELTA);
	mapContext.dispose();
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:32,代码来源:WorldPaintableDirectLayerTest.java

示例14: testPolygon

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Test
public void testPolygon() throws Exception {
	ClientSvgLayerInfo geo = new ClientSvgLayerInfo();
	geo.setSvgContent("<svg>\n"
			+ "  <path d=\"M10 10 L90 10 L90 90 L10 90 Z\" style=\"fill:lime;stroke:purple;stroke-width:3px\"/>\n"
			+ "</svg>");
	geo.setViewBoxWorldBounds(new Bbox(0, 0, 10, 10));
	geo.setViewBoxScreenBounds(new Bbox(0,0,100,100));

	ClientMapInfo mapInfo = new ClientMapInfo();
	mapInfo.setCrs("EPSG:4326");
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(new Bbox(0, 0, 100, 100));
	mapRasterizingInfo.setScale(1);
	mapRasterizingInfo.setTransparent(true);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY,
			mapRasterizingInfo);

	MapContext mapContent = new DefaultMapContext();
	mapContent.getViewport().setBounds(
			new ReferencedEnvelope(0, 100, 0, 100, geoService
					.getCrs2(mapInfo.getCrs())));
	mapContent.getViewport().setScreenArea(new Rectangle(0, 0, 100, 100));
	AffineTransform tf = mapContent.getViewport().getWorldToScreen();
	SvgDirectLayer layer = (SvgDirectLayer) layerFactory.createLayer(
			mapContent, geo);
	new DirectLayerAssert(layer, mapContent).assertEqualImage(
			"polygon2.png", writeImages, DELTA);
	mapContent.dispose();
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:31,代码来源:SvgDirectLayerTest.java

示例15: testLegend

import org.geomajas.plugin.rasterizing.command.dto.MapRasterizingInfo; //导入方法依赖的package包/类
@Test
public void testLegend() throws Exception {
	ClientMapInfo mapInfo = new ClientMapInfo();
	MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
	mapRasterizingInfo.setBounds(new Bbox(-180, -90, 360, 180));
	mapInfo.setCrs("EPSG:4326");
	mapRasterizingInfo.setScale(2);
	mapRasterizingInfo.setTransparent(true);
	mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);

	ClientRasterLayerInfo cl1 = new ClientRasterLayerInfo();
	cl1.setServerLayerId(layerBluemarble.getId());
	cl1.setLabel("Blue Marble");
	RasterLayerRasterizingInfo rr1 = new RasterLayerRasterizingInfo();
	rr1.setCssStyle("opacity:0.5");
	cl1.getWidgetInfo().put(RasterLayerRasterizingInfo.WIDGET_KEY, rr1);
	mapInfo.getLayers().add(cl1);

	ClientVectorLayerInfo cl2 = new ClientVectorLayerInfo();
	cl2.setServerLayerId(layerBeansPoint.getId());
	cl2.setLayerInfo(layerBeansPoint.getLayerInfo());
	cl2.setLabel(layerBeansPoint.getId());
	VectorLayerRasterizingInfo lr2 = new VectorLayerRasterizingInfo();
	lr2.setStyle(layerBeansPointStyleInfo);
	cl2.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr2);
	mapInfo.getLayers().add(cl2);

	ClientVectorLayerInfo cl3 = new ClientVectorLayerInfo();
	cl3.setServerLayerId(layerBeansMultiLine.getId());
	cl3.setLayerInfo(layerBeansMultiLine.getLayerInfo());
	cl3.setLabel(layerBeansMultiLine.getId());
	VectorLayerRasterizingInfo lr3 = new VectorLayerRasterizingInfo();
	lr3.setStyle(layerBeansMultiLineStyleInfo);
	cl3.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr3);
	mapInfo.getLayers().add(cl3);

	LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo();
	legendRasterizingInfo.setFont(new FontStyleInfo());
	legendRasterizingInfo.getFont().applyDefaults();
	legendRasterizingInfo.getFont().setSize(12);
	legendRasterizingInfo.getFont().setFamily("Arial");
	legendRasterizingInfo.setTitle("legend");
	mapRasterizingInfo.setLegendRasterizingInfo(legendRasterizingInfo);
	new LegendAssert(mapInfo).assertEqualImage("legend.png", writeImages, DELTA);
}
 
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:46,代码来源:ImageServiceLegendTest.java


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