encode

fun encode(entities: List<DrawableEntity>, pretty: Boolean = false): String

A KML document of entities, in their order. pretty adds line breaks and indentation; the content is the same.