0
votes

If I have a KmlPolygon object, how might I convert this to a KML string? This functionality would allow you to save whatever has been modelled and use it as a layer in Google Earth desktop for instance, or even load it back into the web plugin.

EDIT

This would do the opposite of fetchKml.

1

1 Answers

0
votes

Found it. You can use the getKml() function of KmlFeature to return the KML string. You can also add multiple KmlPolygon objects by constructing a KmlDocument using the dom.buildDocument() of the utility library, and then using getKml() on that.