Skip to content

help with plotKML::kml()

1 message · Tomislav Hengl

#
I think I set the color of the polygon line "white" which is the KML 
default, so you can only change the color of polygons (fill); see:

https://github.com/cran/plotKML/blob/master/R/layer.SpatialPolygons.R#L112

To change colors per polygon you should run:

data(eberg_zones)
legend = get("colour_scale_factor", envir = plotKML.opts)
kml_open("eberg_zones.kml")
kml_layer(eberg_zones, colour=ZONES, colour_scale=legend)
kml_close("eberg_zones.kml")

See also: http://gsif.isric.org/doku.php/wiki:tutorial_plotkml

Polygon outlines 
(https://developers.google.com/kml/documentation/kmlreference#polystyle) 
could also be changed but not via plotKML.

HTH,
On 07-08-17 17:46, MacQueen, Don wrote: