[Geoserver-users] KML Line Style

hi,

i got questions about the KML Ouput.

1. doesnt seem to matter which stroke width im using in my *.sld file.
     Google Earth seem to render the lines always in the same size. I took a
look in the *.kml File.
    The stroke width was right in it...but doenst seem to be used in GE ?!
what could be the reason?

an example from my *.sld file(s)

                                        <LineSymbolizer>
            <Stroke>
              <CssParameter name="stroke">#FF0000</CssParameter>
              <CssParameter name="stroke-width">
              <ogc:Literal>9</ogc:Literal>
              </CssParameter>
                        </Stroke>
          </LineSymbolizer>

..from the result .... *.kml

.....<LineStyle><color>#ff000000</color><width>9</width></LineStyle>......

2. i dont get an outline in GE. im trying to do this that way :

                                           <LineSymbolizer>
            <Stroke>
              <CssParameter name="stroke">#000000</CssParameter>
              <CssParameter name="stroke-width">
              <ogc:Literal>7</ogc:Literal>
              </CssParameter>
            </Stroke>
          </LineSymbolizer>
          <LineSymbolizer>
            <Stroke>
              <CssParameter name="stroke">#FF0000</CssParameter>
              <CssParameter name="stroke-width">
              <ogc:Literal>5</ogc:Literal>
              </CssParameter>
            </Stroke>
          </LineSymbolizer>

anyone an idea how to get an outline in GE..or does GE just render one of
these defined in *.sld?

--
View this message in context: http://www.nabble.com/KML-Line-Style-tf2601158.html#a7256504
Sent from the GeoServer - User mailing list archive at Nabble.com.

I have tried experimenting with making an outline to a road (one thick one and one thin one on top of that) but google earth only renders the first most line style that is defined. So what you will have to do is to have two datasets of the same data, and use two different styles.
You might also be able to try making a single request that calls the layer twice however (I haven't tried this but it might work). Something like this:
http://localhost:8080/geoserver/wms/layers=roads,roads&styles=thick,thin&

As for the line thickness, I believe this works, but I have never tried a thickness larger than 4 or 5. Maybe it is capped at or before 9?

Brent Owens
(The Open Planning Project)

wrobel wrote:

hi,

i got questions about the KML Ouput.

1. doesnt seem to matter which stroke width im using in my *.sld file.
     Google Earth seem to render the lines always in the same size. I took a
look in the *.kml File.
    The stroke width was right in it...but doenst seem to be used in GE ?!
what could be the reason?

an example from my *.sld file(s)

                                        <LineSymbolizer>
            <Stroke>
              <CssParameter name="stroke">#FF0000</CssParameter>
              <CssParameter name="stroke-width">
              <ogc:Literal>9</ogc:Literal>
              </CssParameter>
                        </Stroke>
          </LineSymbolizer>

..from the result .... *.kml

.....<LineStyle><color>#ff000000</color><width>9</width></LineStyle>......

2. i dont get an outline in GE. im trying to do this that way :

                                           <LineSymbolizer>
            <Stroke>
              <CssParameter name="stroke">#000000</CssParameter>
              <CssParameter name="stroke-width">
              <ogc:Literal>7</ogc:Literal>
              </CssParameter>
            </Stroke>
          </LineSymbolizer>
          <LineSymbolizer>
            <Stroke>
              <CssParameter name="stroke">#FF0000</CssParameter>
              <CssParameter name="stroke-width">
              <ogc:Literal>5</ogc:Literal>
              </CssParameter>
            </Stroke>
          </LineSymbolizer>

anyone an idea how to get an outline in GE..or does GE just render one of
these defined in *.sld?