[Geoserver-users] KML and Icon size

Hi all,

I was playing with Geoserver kml (mode=download) and dynamically generated icons using GoogleCharts - it looks that it works great except one small issue. I tried to set dynamically the size of the icon (chart), but this seems to be ignored in produced KML. Icon size is generated properly in WMS, but not in KML vector output.

I'm setting icon size using:
    <sld:Size>
                 <ogc:Literal>200</ogc:Literal>
     </sld:Size>

For icon I'm using:

<sld:ExternalGraphic>
                <sld:OnlineResource
              xlink:href="http://chart.apis.google.com/chart?cht=p&amp;chd=t:10,15&amp;chs=250x250&amp;chf=bg,s,65432100&quot; />
                <sld:Format>image/png</sld:Format>
   </sld:ExternalGraphic>

Is there any workaround how to set icon size for kml or is this a bug?

Thank you,
Best regards,
Jan.

If I understand you correctly, then I don't think you can do that. KML doesn't allow you to specify a size for your placemark icons, only a scale. (Everything is treated as 32x32 ?)

http://code.google.com/apis/kml/documentation/kmlreference.html#iconstyle

-Arne

Jan Jezek wrote:

Hi all,

I was playing with Geoserver kml (mode=download) and dynamically generated icons using GoogleCharts - it looks that it works great except one small issue. I tried to set dynamically the size of the icon (chart), but this seems to be ignored in produced KML. Icon size is generated properly in WMS, but not in KML vector output.

I'm setting icon size using:
    <sld:Size> <ogc:Literal>200</ogc:Literal> </sld:Size>

For icon I'm using:

<sld:ExternalGraphic>
                <sld:OnlineResource
              xlink:href="http://chart.apis.google.com/chart?cht=p&amp;chd=t:10,15&amp;chs=250x250&amp;chf=bg,s,65432100&quot; />
                <sld:Format>image/png</sld:Format>
   </sld:ExternalGraphic>

Is there any workaround how to set icon size for kml or is this a bug?

Thank you,
Best regards,
Jan.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
  

Hi Arne,

thank you for reply. Scale parameter is exactly what I'm missing in produced KML. I don't know what is the default size in KML (my icons seems to be of about 50x50) but if there is any default value then it should be possible to calculate the KML scale parameter from <sld:Size>.
But I understand that this is more or less new feature than a bug...

My idea was to get pie charts like this:
http://blog.thematicmapping.org/2008/06/proportional-symbols-in-three.html

Best regards,
Jan.

______________________________________________________________

Od: ak@anonymised.com
Komu: Jan Jezek <h.jezek@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Datum: 03.06.2009 19:57
Předmět: Re: [Geoserver-users] KML and Icon size

If I understand you correctly, then I don't think you can do that. KML doesn't allow you to specify a size for your placemark icons, only a scale. (Everything is treated as 32x32 ?)

http://code.google.com/apis/kml/documentation/kmlreference.html#iconstyle

-Arne

Jan Jezek wrote:

Hi all,

I was playing with Geoserver kml (mode=download) and dynamically generated icons using GoogleCharts - it looks that it works great except one small issue. I tried to set dynamically the size of the icon (chart), but this seems to be ignored in produced KML. Icon size is generated properly in WMS, but not in KML vector output. >
I'm setting icon size using:
    <sld:Size> > <ogc:Literal>200</ogc:Literal> > </sld:Size>

For icon I'm using:

<sld:ExternalGraphic>
                <sld:OnlineResource
              xlink:href="http://chart.apis.google.com/chart?cht=p&amp;chd=t:10,15&amp;chs=250x250&amp;chf=bg,s,65432100&quot; />
                <sld:Format>image/png</sld:Format>
   </sld:ExternalGraphic> >
Is there any workaround how to set icon size for kml or is this a bug?

Thank you,
Best regards,
Jan.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises > looking to deploy the next generation of Solaris that includes the latest > innovations from Sun and the OpenSource community. Download a copy and > enjoy capabilities such as Networking, Storage and Virtualization. > Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users