Dear List,

I am trying to output a a SpatialPolygonsDataFrame using the maptools:::kmlPolygons function. However, I am only able to get this function to output the first Polygon from each Polygons object.

If I try the example given in the documentation

library(maptools)
data(wrld_simpl)
kmlPolygons(wrld_simpl, kmlfile = "worldPolitical.kml", name = "KML Polygons",
           description = "the world", col = "red",
           visibility = 1, lwd = 1, border = "white", kmlname = "R Test",
           kmldescription = "This is <b>only</b> a <a
href='http://www.r-project.org'>R</a> test.")

I notice that it contains an outline for the lower 48 states but does not contain an outline for Alaska (say).

If this is not the correct place to post this query I would be grateful if you would both accept my apologies and point me in a more favourable direction. The world of spatial data objects remains a very new one to me!

Thanks,
Phil Haines

Below is my output from the sessionInfo() command.

> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] maptools_0.8-30 sp_1.0-15

loaded via a namespace (and not attached):
[1] foreign_0.8-61  grid_3.1.0      lattice_0.20-29 tools_3.1.0



This message and any attachments contain information that may be RMS Inc. confidential and/or privileged.  If you are not the intended recipient (or authorized to receive for the intended recipient), and have received this message in error, any use, disclosure or distribution is strictly prohibited.   If you have received this message in error, please notify the sender immediately by replying to the e-mail and permanently deleting the message from your computer and/or storage system.


	[[alternative HTML version deleted]]

