writekml: Write kml Object to file

writekmlR Documentation

Write kml Object to file

Description

Write the kml object to the specified file

Usage

yourkml$writekml(path)

Arguments

path

Mandatory. The full path to your kml file. Remember that the filename must end with kml

Author(s)

Brent Cameron
Department of Fisheries and Oceans Canada
Population Ecology Division

Examples


mykml = RKmlObject()


mykml$addLabelStyle(styleid = "labelstyle1", color = "red", transparency = .2, scale = 3)
mykml$addLabelStyle(styleid = "labelstyle2", color = "green", transparency = 1, scale = 1)
 
x = data.frame(cbind(c(45.9178, 46.807), c(-59.967, -60.321), c("labelstyle1", "labelstyle2"), c("Example1", "Example2"), c("Louisbourg", "Neil's Harbour" )))
names(x) = c("lat", "lon", "styleUrl", "name", "description")
  
mykml$addPoint(x)
#mykml$writekml(path = file.path(getwd(), "kml_outputs", "example_kml.kml"))


brent0/kmlbuilder documentation built on Feb. 2, 2024, 2:05 a.m.