Reading and Writing KML files:
readOGR(dsn = "C:/Users/gregorp.NEBULA2/Downloads/1433", layer =
"wa_counties", encoding="KML")
Notice, for reading: no file extension, layer taken from inside the
<name>
tags in the KML file, encoding specified.
writeOGR(obj = obName, dsn = "directory/file.kml", driver = "KML",
layer = "layerName")
Writing KML is basically the same.
Reading SHP files
readOGR(dsn = "C:/Users/gregorp.NEBULA2/Downloads/1433", layer =
"wa_counties")
dsn
points to directory, layer is name of particular shape file
(sans file extension).
1 | kml()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.