assertEquals("name", SLD.textLabelString(text)); Map<String, String> options = text.getOptions(); assertEquals("true", options.get("followLine"));
assertEquals("name", SLD.textLabelString(text)); assertEquals(Color.black, SLD.color(text.getFill()));
assertEquals("name", SLD.textLabelString(text)); assertEquals(Color.black, SLD.textFontFill(text));
@Test public void testLineWithDefaultLabel() throws Exception { // <UserStyle> // <Title>SLD Cook Book: Line with default label</Title> // <FeatureTypeStyle> // <Rule> // <LineSymbolizer> // <Stroke> // <CssParameter name="stroke">#FF0000</CssParameter> // </Stroke> // </LineSymbolizer> // <TextSymbolizer> // <Label> // <ogc:PropertyName>name</ogc:PropertyName> // </Label> // <Font /> // <Fill> // <CssParameter name="fill">#000000</CssParameter> // </Fill> // </TextSymbolizer> // </Rule> // </FeatureTypeStyle> // </UserStyle> Style style = parse("line", "default-label.sld"); LineSymbolizer line = SLD.lineSymbolizer(style); assertEquals(Color.red, SLD.color(line)); TextSymbolizer text = SLD.textSymbolizer(style); assertEquals("name", SLD.textLabelString(text)); assertEquals(Color.black, SLD.color(text.getFill())); }
assertEquals("name", SLD.textLabelString(text)); assertEquals(Color.black, SLD.color(text.getFill()));
assertEquals("name", SLD.textLabelString(text));
assertEquals("name", SLD.textLabelString(text));
assertEquals("name", SLD.textLabelString(text)); assertEquals(Color.black, SLD.textFontFill(text));
assertEquals("name", SLD.textLabelString(text)); assertEquals(color("990099"), SLD.textFontFill(text));