Hi mark :)

Thank you for your answer !

Meanwhile, I corrected my bad coding because I looked at the source code of Ysld.java :

‌       StringBuilder gareInput;
        gareInput = new StringBuilder();

        String inputLine;

        while ((inputLine = in.readLine()) != null) {
            gareInput.append(inputLine);
            gareInput.append('\n');
        }
        in.close();

StyledLayerDescriptor gareSldDesc = Ysld.parse(gareInput.toString());


But then how would you get the style of gareSldDesc object in order to display the wfs layer ?
I tried that code but nothing got displayed :

‌ NamedLayer gareLayer = (NamedLayer) gareSldDesc.getStyledLayers()[0];

        Style gareStyle;
        gareStyle = gareLayer.getStyles()[0];

        Layer layer = new FeatureLayer(featureSource, gareStyle);
        map.addLayer(layer);

        // Now display the map
        JMapFrame.showMap(map);


Thank you for your help :)

_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to