@Test public void testCreatePolygonSymbolizer() throws Exception { JSONObject style = new JSONObject(); style.put("fillColor", "#eee"); style.put("fillOpacity", 0.3); style.put("strokeColor", "#fff"); style.put("strokeOpacity", 0.2); style.put("strokeWidth", 2); style.put("strokeDashstyle", "5 2"); style.put("strokeLinecap", "round"); final PolygonSymbolizer symbolizer = helper.createPolygonSymbolizer(new PJsonObject(style, null)); assertNotNull(symbolizer); transformer.transform(symbolizer); assertStroke(0.2, "round", symbolizer.getStroke(), "#FFFFFF", new float[]{5f, 2f}, 2.0); assertFill(0.3, "#EEEEEE", symbolizer.getFill()); }
@Nullable @VisibleForTesting protected PolygonSymbolizer createPolygonSymbolizer(final PJsonObject styleJson) { if (this.allowNullSymbolizer && !styleJson.has(JSON_FILL_COLOR)) { return null; } final PolygonSymbolizer symbolizer = this.styleBuilder.createPolygonSymbolizer(); symbolizer.setFill(createFill(styleJson)); symbolizer.setStroke(createStroke(styleJson, false)); return symbolizer; }
JsonStyleParserHelper { @Nullable @VisibleForTesting protected PolygonSymbolizer createPolygonSymbolizer(final PJsonObject styleJson) { if (this.allowNullSymbolizer && !styleJson.has(JSON_FILL_COLOR)) { return null; } final PolygonSymbolizer symbolizer = this.styleBuilder.createPolygonSymbolizer(); symbolizer.setFill(createFill(styleJson)); symbolizer.setStroke(createStroke(styleJson, false)); return symbolizer; } }
JsonStyleParserHelper { @Nullable @VisibleForTesting protected PolygonSymbolizer createPolygonSymbolizer(final PJsonObject styleJson) { if (this.allowNullSymbolizer && !styleJson.has(JSON_FILL_COLOR)) { return null; } final PolygonSymbolizer symbolizer = this.styleBuilder.createPolygonSymbolizer(); symbolizer.setFill(createFill(styleJson)); symbolizer.setStroke(createStroke(styleJson, false)); return symbolizer; } JsonStyleParserHelper(
            @Nullable final Configuration configuration,
            @Nonnull final ClientHttpRequestFactory requestFactory,
            @Nonnull final StyleBuilder styleBuilder,
            final boolean allowNullSymbolizer); }
JsonStyleParserHelper { @Nullable @VisibleForTesting protected PolygonSymbolizer createPolygonSymbolizer(final PJsonObject styleJson) { if (this.allowNullSymbolizer && !styleJson.has(JSON_FILL_COLOR)) { return null; } final PolygonSymbolizer symbolizer = this.styleBuilder.createPolygonSymbolizer(); symbolizer.setFill(createFill(styleJson)); symbolizer.setStroke(createStroke(styleJson, false)); return symbolizer; } JsonStyleParserHelper(
            @Nullable final Configuration configuration,
            @Nonnull final ClientHttpRequestFactory requestFactory,
            @Nonnull final StyleBuilder styleBuilder,
            final boolean allowNullSymbolizer); Style createStyle(final List<Rule> styleRules); @Nullable PointSymbolizer createPointSymbolizer(final PJsonObject styleJson); }
JsonStyleParserHelper { @Nullable @VisibleForTesting protected PolygonSymbolizer createPolygonSymbolizer(final PJsonObject styleJson) { if (this.allowNullSymbolizer && !styleJson.has(JSON_FILL_COLOR)) { return null; } final PolygonSymbolizer symbolizer = this.styleBuilder.createPolygonSymbolizer(); symbolizer.setFill(createFill(styleJson)); symbolizer.setStroke(createStroke(styleJson, false)); return symbolizer; } JsonStyleParserHelper(
            @Nullable final Configuration configuration,
            @Nonnull final ClientHttpRequestFactory requestFactory,
            @Nonnull final StyleBuilder styleBuilder,
            final boolean allowNullSymbolizer); Style createStyle(final List<Rule> styleRules); @Nullable PointSymbolizer createPointSymbolizer(final PJsonObject styleJson);  }