Hi,
I was trying to reproduce the old KML icons used by marks in the previous KML generator with a CSS
style, and believe I more or less succeeded with this style:
(attachments)
···
- {
mark: symbol(‘circle’), symbol(‘circle’);
mark-size: 12, 4;
}
:nth-mark(1) {
fill: red;
stroke: black;
stroke-width: 2;
}
:nth-mark(2) {
fill: black;
}
However, there is a gotcha. Here is how the map looks as plain WMS:
and here is how it looks in KML instead:
See how much bigger the icons are?
As far as I can see, the icon service itself generates them bigger, e…g, following the links
in the KML I get:
and then there is a 0.875 scale factor in the KML that fails to compensate for the extra large image
we’re getting…
Is there a reason for this, or can I just treat it like a bug?
Cheers
Andrea
PS: I’m completely weirded out as to how the icon is working in Google Earth… you see the
that the icon I get back misses the central black circle, and yet, if I pull the kml from curl,
http://localhost:8080/geoserver/sf/wms?service=wms&request=GetMap&version=1.1.1&format=application/vnd.google-earth.kml+xml&layers=sf:bugsites&styles=bugsites_kmlicon2&height=2048&width=2048&transparent=false&srs=EPSG:4326&format_options=SUPEROVERLAY:false;AUTOFIT:true;KMPLACEMARK:false;KMSCORE:40;KMATTR:true;MODE:refresh&bbox=-180,-90,180,90&featureid=bugsites.1
All I get is:
And that url for the icon just returns the icon I pasted above… how the heck is Google Earth displaying
the black small circle inside it too? I would have expected multiple icon styles, or a link that shows
both symbolizers stacked one on top of the other…
I see that to get the small black circle I have to use the
http://localhost:8080/geoserver/kml/icon/bugsites_kmlicon2?0.0.1=&0.0.1=
link instead, which provides as a result:
But this url is nowhere to be found… what am I missing?
Cheers
Andrea
<ul class="textattributes">
<li><strong><span class="atr-name">cat</span>:</strong> <span class="atr-value">1</span></li>
<li><strong><span class="atr-name">str1</span>:</strong> <span class="atr-value">Beetle site</span></li>
</ul>
-103.86761147825553
44.38484141184452
0.0
0.0
0.0
0.0
clampToGround