saveStyle, loadStyle | R Documentation |
Write a style to file for future use. The file can be read back into an existing kml object with loadStyle.
yourkml$saveStyle(path)
yourkml$loadStyle(path)
path |
Mandatory. The full path to where the style will be saved/loaded. |
Brent Cameron
Department of Fisheries and Oceans Canada
Population Ecology Division
xmaskml = RKmlObject()
path = file.path(getwd(), "xmas_style")
xmaskml$addLabelStyle(styleid = "redlabel", color = "red", transparency = .2, scale = 3)
xmaskml$addLabelStyle(styleid = "greenlabel", color = "green", transparency = 1, scale = 1)
#xmaskml$saveStyle(path)
port_starboard_kml = RKmlObject()
port_starboard_kml$addLabelStyle(styleid = "yellowlabel", color = "yellow", transparency = .2, scale = 3)
#port_starboard_kml$loadStyle(path)
port_starboard_kml$liststyles()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.