Be a good XML citizen and always write out schemaLocation. Use serialize on ol.parser.XML so that we don't have to set xmlns manually.
35 lines
1.0 KiB
XML
35 lines
1.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/kml/2.2 http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd">
|
|
<Document>
|
|
<name>Polygon.kml</name>
|
|
<open>0</open>
|
|
<Placemark>
|
|
<name>hollow box</name>
|
|
<Polygon>
|
|
<outerBoundaryIs>
|
|
<LinearRing>
|
|
<coordinates>
|
|
-122.366278,37.818844,30
|
|
-122.365248,37.819267,30
|
|
-122.36564,37.819861,30
|
|
-122.366669,37.819429,30
|
|
-122.366278,37.818844,30
|
|
</coordinates>
|
|
</LinearRing>
|
|
</outerBoundaryIs>
|
|
<innerBoundaryIs>
|
|
<LinearRing>
|
|
<coordinates>
|
|
-122.366212,37.818977,30
|
|
-122.365424,37.819294,30
|
|
-122.365704,37.819731,30
|
|
-122.366488,37.819402,30
|
|
-122.366212,37.818977,30
|
|
</coordinates>
|
|
</LinearRing>
|
|
</innerBoundaryIs>
|
|
</Polygon>
|
|
</Placemark>
|
|
</Document>
|
|
</kml>
|