Hello,
I experience a problem when trying to update my code to 2.6-Snapshot
release.
I am trying to replace the deprecated methods with the new intended methods,
but I fail on adding a FeatureTypeStyle to a Style. See code below. How can
I solve my problem?
Thanks in advance!
Koen
import org.geotools.styling.FeatureTypeStyle;
import org.geotools.styling.Style;
StyleFactory styleFact = CommonFactoryFinder.getStyleFactory(null);
FilterFactory filterFac = CommonFactoryFinder.getFilterFactory(null);
StyleBuilder styleBldr = new StyleBuilder();
Style style;
Stroke stroke = styleFact.createStroke(
filterFac.literal("#FF0000"),
filterFac.literal(2));
LineSymbolizer symbolizer =
styleFact.createLineSymbolizer(stroke,"the_geom");
Rule rule = styleFact.createRule();
rule.symbolizers().add(symbolizer);
FeatureTypeStyle fts = styleFact.createFeatureTypeStyle();
fts.rules().add(rule);
style = styleFact.createStyle();
/*
* The method add(capture#1-of ? extends FeatureTypeStyle) in the
type
* List<capture#1-of ? extends FeatureTypeStyle> is not applicable
for
* the arguments (FeatureTypeStyle)
*/
style.featureTypeStyles().add(fts); //==> ERROR (see above)
style.addFeatureTypeStyle(fts); //==> DEPRECATED
--
View this message in context:
http://n2.nabble.com/2.6-Snapshot%3A-Problem-updating-style-tp1639095p1639095.html
Sent from the geotools-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel