org.geoserver.wms.GetLegendGraphicRequest.setStrict()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.geoserver.wms.GetLegendGraphicRequest.setStrict()方法的一些代码示例,展示了GetLegendGraphicRequest.setStrict()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GetLegendGraphicRequest.setStrict()方法的具体详情如下:
包路径:org.geoserver.wms.GetLegendGraphicRequest
类名称:GetLegendGraphicRequest
方法名:setStrict

GetLegendGraphicRequest.setStrict介绍

暂无

代码示例

代码示例来源:origin: org.geoserver/gs-wms

? Boolean.valueOf((String) rawKvp.get("STRICT"))
        : request.isStrict();
request.setStrict(strict);
if (strict && layer == null) {
  throw new ServiceException(

代码示例来源:origin: robward-scisys/sldeditor

request.setHeight(legendOptionData.getImageHeight());
request.setTransparent(legendOptionData.isTransparent());
request.setStrict(false);

代码示例来源:origin: org.geoserver/gs-wms

Resource sampleLegendFolder = getSamplesFolder();
legendGraphicRequest.setStrict(false);
legendGraphicRequest.setLayer((FeatureType) null);
legendGraphicRequest.setStyle(style.getStyle());

代码示例来源:origin: org.geoserver.web/gs-web-wms

request.setLayer(null);
request.setStyle(style);
request.setStrict(false);
Map<String, String> legendOptions = new HashMap<>();
legendOptions.put("forceLabels", "on");

代码示例来源:origin: org.geoserver/gs-wms

/**
 * Tests that the legend graphic is still produced when the request's strict parameter is set to
 * false and a layer is not specified
 */
@org.junit.Test
public void testNoLayerProvidedAndNonStrictRequest() throws Exception {
  Style style = getCatalog().getStyleByName("rainfall").getStyle();
  assertNotNull(style);
  GetLegendGraphicRequest req = new GetLegendGraphicRequest();
  req.setStrict(false);
  req.setLayer(null);
  req.setStyle(style);
  final int HEIGHT_HINT = 30;
  req.setHeight(HEIGHT_HINT);
  // use default values for the rest of parameters
  this.legendProducer.buildLegendGraphic(req);
  BufferedImage image = this.legendProducer.buildLegendGraphic(req);
  // was the legend painted?
  assertNotBlank("testRainfall", image, LegendUtils.DEFAULT_BG_COLOR);
  // was the legend painted?
  assertNotBlank("testRainfall", image, LegendUtils.DEFAULT_BG_COLOR);
}
/** Tests that the legend graphic is produced for multiple layers */

相关文章