This adds ol.parser.ogc.KML which can be used to read and write KML documents. NetworkLinks are retrieved asynchronously. Current caveats of the implementation are: * LabelStyle not yet implemented. Missing support in renderers. * When using shared structures the parser needs to be configured with dimension 2. * We need a better way to disable fill, currently we use opacity as a workaround. * We cannot really roundtrip documents, since some of the info is not preserved in the ol structures. But we can write out most of the important info.
37 lines
975 B
XML
37 lines
975 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<kml xmlns="http://www.opengis.net/kml/2.2">
|
|
<Document>
|
|
<name>Polygon.kml</name>
|
|
<open>0</open>
|
|
<Placemark>
|
|
<name>hollow box</name>
|
|
<Polygon>
|
|
<extrude>1</extrude>
|
|
<altitudeMode>relativeToGround</altitudeMode>
|
|
<outerBoundaryIs>
|
|
<LinearRing>
|
|
<coordinates>
|
|
-122.366278,37.818844,30
|
|
-122.365248,37.819267,30
|
|
-122.365640,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>
|