Hello.

I posted few days ago for my problem, but nobody answered. So I am going to
try to explain in a better way, hoping somebody will be able to answer...
I am currently simply trying to enter information into my system.
When I click on the map, I add a feature to a MemoryDataStore. This feature
has the following schema :

private static final String identifier = "SensorSite";
DataUtilities.createType(identifier,
"the_geom:MultiPoint,Name:String,TElev:Double");

I want to use the semi-transparency, to see my rasters through my points
(and eventually other types of features).

I wrote an SLD style, like this :

<?xml version="1.0" encoding="UTF-8"?>
<UserStyle xmlns:ogc="http://www.opengis.net";>
    <FeatureTypeStyle>
        <!-- This part specifies the point symbol -->
        <Rule>
            <PointSymbolizer>
                <Geometry>
                    <ogc:PropertyName>the_geom</ogc:PropertyName>
                </Geometry>
                <Graphic>
                    <Mark>
                        <WellKnownName>star</WellKnownName>
                        <Fill>
                            <CssParameter name="fill">#ee3b3b</CssParameter>
                            <CssParameter
name="fill-opacity">0.5</CssParameter>
                        </Fill>
                        <Stroke>
                            <CssParameter
name="stroke">#0000ee</CssParameter>
                            <CssParameter
name="stroke-opacity">1</CssParameter>
                            <CssParameter
name="stroke-width">1</CssParameter>
                        </Stroke>
                    </Mark>
                    <Size>20.0</Size>
                </Graphic>
            </PointSymbolizer>
        </Rule>

        <!-- This part specifies the label name -->
        <Rule>
            <TextSymbolizer>
                <Label>
                    <ogc:PropertyName>Name</ogc:PropertyName>
                </Label>
                <LabelPlacement>
                    <PointPlacement>
                        <AnchorPoint>
                            <AnchorPointX>1.0</AnchorPointX>
                            <AnchorPointY>0.5</AnchorPointY>
                        </AnchorPoint>
                        <Displacement>
                            <DisplacementX>-10</DisplacementX>
                            <DisplacementY>-5</DisplacementY>
                        </Displacement>
                    </PointPlacement>
                </LabelPlacement>
                <Font/>
                <Fill>
                    <CssParameter name="fill">#0000ff</CssParameter>"
                </Fill>
                <Halo/>
            </TextSymbolizer>
        </Rule>
    </FeatureTypeStyle>
</UserStyle>

I load this SLD with the following methods :

public static Style getSensorSiteLayerStyle(){
        URL sld = MSS_Map.class.getResource("/resources/styles/site.xml");
    SLDParser parser = new SLDParser(new StyleFactoryImpl());
        try{
            parser.setInput(sld);
        }catch(IOException ioe){
            ioe.printStackTrace();
        }

        return parser.readXML()[0]
}

sensorSiteLayer = new DefaultMapLayer(fsSites, getSensorSiteLayerStyle());
sensorSiteLayer.setTitle("Sensor sites");
context.addLayer(sensorSiteLayer);

unfortunately, in this configuration, When I display a sensor site, the star
is not filled... because of this line : <CssParameter
name="fill-opacity">0.5</CssParameter>
(If I put the value 1, i got the filling !)
I tried for many other datas... all the time, if I put a fille-opacity
parameter, I don't have the good rendering (the part semi-transparent is
never displayed)...

Is there somebody to give me an idea ?
Thanks,
Thomas
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to