jmquintana79
8/4/2017 - 6:58 AM

Build a KML file to be used in Google Earth or Google Maps (MyMaps)

Build a KML file to be used in Google Earth or Google Maps (MyMaps)

"""

DOCUMENTATION: https://simplekml.readthedocs.io/en/latest/

"""
import simplekml

# build kml object
kml = simplekml.Kml()
# insert one point
kml.newpoint(name="label of point",
             description="description",
             coords=[( 18.432314,-33.988862)])  # (lon, lat, optional height)
             
# save
kml.save("output.kml")