Add Document tag to OSM plugin KML output
authorPhilippe Gauthier <philippe.gauthier@deuxpi.ca>
Thu, 9 Aug 2012 02:23:10 +0000 (02:23 +0000)
committerJoey Hess <joey@kitenet.net>
Sat, 25 Aug 2012 03:24:47 +0000 (23:24 -0400)
(cherry picked from commit 519d35368e2f1e7fe1fce577fe7d71ef9bd5c07e)

IkiWiki/Plugin/osm.pm

index 6ba2524d81c25538671559fed0dcd19daa092b50..764767525485d9df1fda2175ec5e5e0c1f832f0e 100644 (file)
@@ -348,6 +348,7 @@ sub writekml($;$) {
                        DATA_MODE => 1, ENCODING => 'UTF-8');
                $writer->xmlDecl();
                $writer->startTag("kml", "xmlns" => "http://www.opengis.net/kml/2.2");
+               $writer->startTag("Document");
 
                # first pass: get the icons
                foreach my $name (keys %{$waypoints{$map}}) {
@@ -407,6 +408,7 @@ sub writekml($;$) {
                        $writer->endTag();
                }
                $writer->endTag();
+               $writer->endTag();
                $writer->end();
 
                writefile("pois.kml", $config{destdir} . "/$map", $output);