I'm pretty much at my wits end at this point, since I've been trying for
several days to get a point loaded from a GML document to apply an SLD style
that has more than just a geometry to symbolize. Basically, I'm going to be
wanting to generate some locations on the fly from my application which will
requested from MapBuilder. It doesn't seem worth it to me to put them into a
geo database (since I already have the database in the application database
and it already stores a lat and long). Now, since I have still have not
been able to find a resource to help me to understand how to begin creating
a simple GML format for my data (which is a different story but I guess
needs solved at some point), I took a GML sample from the tasmanian cities
in geoserver and added it as a layer in mapbuilder. this is fine since it
renders my point. The problem is that the embedded styles won't apply
anything other than the point style. I can't get filters to work, I can get
a label placement to work. I'm really not sure what I could possibly being
doing wrong.. I've tried so many combinations of things, studied all the
examples and just still can't seem to get text or a rule filter to apply (I
have tried this as a FeatureCollection as well). Actually right now I can't
get the style to apply to anything. Does anyone have an example of this
they could post before I rip all my hair out?
This is what I'm using for my layer (in an OWSContext)
<Layer queryable="0" hidden="0">
<Server service="OGC:GML" version="1.1.1" title="Local">
<OnlineResource xlink:type="simple" xlink:href="data/cities.xml"/>
</Server>
<Name>topp:tasmania_cities</Name>
<Title>Tasmania Major Cities</Title>
<Abstract>Tasmania Major based on the Digital Chart of the
World.</Abstract>
<SRS>EPSG:4326</SRS>
<FormatList>
<Format current="1">image/gif</Format>
</FormatList>
<StyleList>
<Style current="1">
<SLD>
<StyledLayerDescriptor version="1.0.0">
<NamedLayer>
<Name>topp:tasmania_cities</Name>
<UserStyle>
<Title/>
<Abstract/>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#55DDDD</CssParameter>
<CssParameter name="fill-opacity">1</CssParameter>
</Fill>
</Mark>
<Opacity>1</Opacity>
<Size>10</Size>
</Graphic>
</PointSymbolizer>
<TextSymbolizer>
<Label>
<PropertyName>CITY_NAME</PropertyName>
</Label>
<Font>
<CssParameter name="font-family">Arial</CssParameter>
<CssParameter name="font-size">14</CssParameter>
</Font>
<Fill>
<CssParameter name="fill-opacity">0.5</CssParameter>
</Fill>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
</SLD>
</Style>
</StyleList>
</Layer>
my cities.xml
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="
http://www.opengis.net/wfs" xmlns:topp="http://www.openplans.org/topp"
xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.openplans.org/topp
http://localhost:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=topp:tasmania_cities
http://www.opengis.net/wfs
http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">
<gml:boundedBy>
<gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="."
cs="," ts=" ">-72.005388 42.337622 -70.970219 43.37279</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<topp:tasmania_cities fid="tasmania_cities.1">
<topp:the_geom>
<gml:MultiPoint srsName="
http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:pointMember>
<gml:Point>
<gml:coordinates xmlns:gml="http://www.opengis.net/gml"
decimal="." cs="," ts=" ">-71.57506809, 42.66758945</gml:coordinates>
</gml:Point>
</gml:pointMember>
</gml:MultiPoint>
</topp:the_geom>
<topp:CITY_NAME>Hobart</topp:CITY_NAME>
<topp:ADMIN_NAME>Tasmania</topp:ADMIN_NAME>
<topp:CNTRY_NAME>Australia</topp:CNTRY_NAME>
<topp:STATUS>Provincial capital</topp:STATUS>
<topp:POP_CLASS>100,000 to 250,000</topp:POP_CLASS>
</topp:tasmania_cities>
</gml:featureMember>
<gml:featureMember>
<topp:tasmania_cities fid="tasmania_cities.2">
<topp:the_geom>
<gml:MultiPoint srsName="
http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:pointMember>
<gml:Point>
<gml:coordinates xmlns:gml="http://www.opengis.net/gml"
decimal="." cs="," ts=" ">-72.12, 42.77</gml:coordinates>
</gml:Point>
</gml:pointMember>
</gml:MultiPoint>
</topp:the_geom>
<topp:CITY_NAME>nother city</topp:CITY_NAME>
<topp:ADMIN_NAME>Tasmania2</topp:ADMIN_NAME>
<topp:CNTRY_NAME>Australia2</topp:CNTRY_NAME>
<topp:STATUS>Provincial capital2</topp:STATUS>
<topp:POP_CLASS>150,000 to 400,000</topp:POP_CLASS>
</topp:tasmania_cities>
</gml:featureMember>
</wfs:FeatureCollection>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mapbuilder-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users