[Geoserver-users] Marker symbols and other options in KML output

How can I control marker symbols and other options in geoserver kml+XML
format (that's kml, not kmz - I am working with a polyline file which I want
to keep as polylines for a google map overlay). By default the kml seems to
pick up icon.png from the geoserver directory, but the scaling is funny. Can
I define custom icons for different layers?

Also, is there any way to control the information associated with each
point. At the moment I get back all the fields in a table.

Regards,

Gregor

--
View this message in context: http://www.nabble.com/Marker-symbols-and-other-options-in-KML-output-tp16850720p16850720.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Gregor
Symbols are typically controlled through the use of an SLD. You can
style points and polygons are you wish based on the definition in the
SLD.

In regards to the information for each point (i.e. when a use clicks
on a point), you will need to take a look at the tutorial:

http://geoserver.org/display/GEOSDOC/Freemarker+templates

You can control many, but not all, aspects of KML output by developing
appropriate Freemarker templates.

Let us know if you need more info.

Best regards,
Jason

On Thu, Apr 24, 2008 at 4:09 PM, gregor_mac <gregor_mac@anonymised.com> wrote:

How can I control marker symbols and other options in geoserver kml+XML
format (that's kml, not kmz - I am working with a polyline file which I want
to keep as polylines for a google map overlay). By default the kml seems to
pick up icon.png from the geoserver directory, but the scaling is funny. Can
I define custom icons for different layers?

Also, is there any way to control the information associated with each
point. At the moment I get back all the fields in a table.

Regards,

Gregor

--
View this message in context: http://www.nabble.com/Marker-symbols-and-other-options-in-KML-output-tp16850720p16850720.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

This is great, it really helps, thank you. I have got Freemarker working a
treat, but I am having problems with the SLD. I have created a point style
in the SLD for a polygon featureclass (the KML output for a polygon
featureclass contains both points (centroids I assume) and polygons for each
feature). However, the output KML contains two <iconstyle> declarations -
one is the default that Geoserver writes when there is no point SLD, and the
other from my SLD:

<kml>
   <Document>
      <name>topp:hc1</name>
      <Style id="GeoServerStylehc1.1">
         <IconStyle>
            <scale>0.4</scale>
            <Icon>
              
<href>http://www.peruweb.org:8080/geoserver/icon-poly.png&lt;/href&gt;
            </Icon>
         </IconStyle>
         <IconStyle>
            <color>ffaaaaaa</color>
            <colorMode>normal</colorMode>
            <Icon>
              
<href>http://maps.google.com/mapfiles/kml/pal3/icon55.png&lt;/href&gt;
            </Icon>
         </IconStyle>
      </Style>

2 iconstyles!

My SLD contains:

<PointSymbolizer>
   <Graphic>
      <ExternalGraphic>
          <OnlineResource xlink:type="simple"
xlink:href="http://maps.google.com/mapfiles/kml/pal3/icon55.png&quot;/&gt;
          <Format>image/png</Format>
       </ExternalGraphic>
   </Graphic>
</PointSymbolizer>

Is this a bug, or something I need to override in a setting? It confuses
google maps, which can't seem to decide which iconstyle to use.

Gregor

jpickeri wrote:

Hi Gregor
Symbols are typically controlled through the use of an SLD. You can
style points and polygons are you wish based on the definition in the
SLD.

In regards to the information for each point (i.e. when a use clicks
on a point), you will need to take a look at the tutorial:

http://geoserver.org/display/GEOSDOC/Freemarker+templates

You can control many, but not all, aspects of KML output by developing
appropriate Freemarker templates.

Let us know if you need more info.

Best regards,
Jason

On Thu, Apr 24, 2008 at 4:09 PM, gregor_mac <gregor_mac@anonymised.com>
wrote:

How can I control marker symbols and other options in geoserver kml+XML
format (that's kml, not kmz - I am working with a polyline file which I
want
to keep as polylines for a google map overlay). By default the kml seems
to
pick up icon.png from the geoserver directory, but the scaling is funny.
Can
I define custom icons for different layers?

Also, is there any way to control the information associated with each
point. At the moment I get back all the fields in a table.

Regards,

Gregor

--
View this message in context:
http://www.nabble.com/Marker-symbols-and-other-options-in-KML-output-tp16850720p16850720.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.

http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Marker-symbols-and-other-options-in-KML-output-tp16850720p16952792.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Can you include the full SLD. Its probably a bug... but the full SLD will let us test it here and be sure.

-Justin

gregor_mac wrote:

This is great, it really helps, thank you. I have got Freemarker working a
treat, but I am having problems with the SLD. I have created a point style
in the SLD for a polygon featureclass (the KML output for a polygon
featureclass contains both points (centroids I assume) and polygons for each
feature). However, the output KML contains two <iconstyle> declarations -
one is the default that Geoserver writes when there is no point SLD, and the
other from my SLD:

<kml>
   <Document>
      <name>topp:hc1</name>
      <Style id="GeoServerStylehc1.1">
         <IconStyle>
            <scale>0.4</scale>
            <Icon>
              <href>http://www.peruweb.org:8080/geoserver/icon-poly.png&lt;/href&gt;
            </Icon>
         </IconStyle>
         <IconStyle>
            <color>ffaaaaaa</color>
            <colorMode>normal</colorMode>
            <Icon>
              <href>http://maps.google.com/mapfiles/kml/pal3/icon55.png&lt;/href&gt;
            </Icon>
         </IconStyle>
      </Style>

2 iconstyles!

My SLD contains:

<PointSymbolizer>
   <Graphic>
      <ExternalGraphic>
          <OnlineResource xlink:type="simple"
xlink:href="http://maps.google.com/mapfiles/kml/pal3/icon55.png&quot;/&gt;
          <Format>image/png</Format>
       </ExternalGraphic>
   </Graphic>
</PointSymbolizer>

Is this a bug, or something I need to override in a setting? It confuses
google maps, which can't seem to decide which iconstyle to use.

Gregor

jpickeri wrote:

Hi Gregor
Symbols are typically controlled through the use of an SLD. You can
style points and polygons are you wish based on the definition in the
SLD.

In regards to the information for each point (i.e. when a use clicks
on a point), you will need to take a look at the tutorial:

http://geoserver.org/display/GEOSDOC/Freemarker+templates

You can control many, but not all, aspects of KML output by developing
appropriate Freemarker templates.

Let us know if you need more info.

Best regards,
Jason

On Thu, Apr 24, 2008 at 4:09 PM, gregor_mac <gregor_mac@anonymised.com>
wrote:

How can I control marker symbols and other options in geoserver kml+XML
format (that's kml, not kmz - I am working with a polyline file which I
want
to keep as polylines for a google map overlay). By default the kml seems
to
pick up icon.png from the geoserver directory, but the scaling is funny.
Can
I define custom icons for different layers?

Also, is there any way to control the information associated with each
point. At the moment I get back all the fields in a table.

Regards,

Gregor

--
View this message in context:
http://www.nabble.com/Marker-symbols-and-other-options-in-KML-output-tp16850720p16850720.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.

http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com