Merge pull request #726 from bartvde/kml_serialize
Small fixes for KML write (r=@ahocevar)
This commit is contained in:
@@ -156,7 +156,10 @@ describe('ol.parser.kml', function() {
|
||||
expect(obj.features[0].get('name')).to.eql('Pezinok');
|
||||
});
|
||||
it('Test line style', function() {
|
||||
var test_style = '<kml xmlns="http://www.opengis.net/kml/2.2"> ' +
|
||||
var test_style = '<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><Placemark><Style><LineStyle> <color>870000ff</color> ' +
|
||||
'<width>10</width> </LineStyle> </Style> <LineString> ' +
|
||||
'<coordinates> -112,36 -113,37 </coordinates> </LineString>' +
|
||||
@@ -173,7 +176,7 @@ describe('ol.parser.kml', function() {
|
||||
expect(symbolizer.strokeWidth).to.eql(10);
|
||||
});
|
||||
it('Test style fill', function() {
|
||||
var test_style_fill = '<kml xmlns="http://www.opengis.net/kml/2.2"> ' +
|
||||
var test_style_fill = '<kml xmlns="http://www.opengis.net/kml/2.2">' +
|
||||
'<Document><Placemark> <Style> <PolyStyle> <fill>1</fill> ' +
|
||||
'<color>870000ff</color> <width>10</width> </PolyStyle> </Style>' +
|
||||
'<Polygon><outerBoundaryIs><LinearRing><coordinates>' +
|
||||
@@ -188,7 +191,10 @@ describe('ol.parser.kml', function() {
|
||||
'49.630662409673505 8.397385910100951,48.45172350357396 ' +
|
||||
'5.001370157823406,49.26855713824488</coordinates></LinearRing>' +
|
||||
'</outerBoundaryIs></Polygon></Placemark></Document></kml>';
|
||||
var style_fill_write = '<kml xmlns="http://www.opengis.net/kml/2.2"> ' +
|
||||
var style_fill_write = '<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><Placemark> <Style> <PolyStyle> <fill>1</fill> ' +
|
||||
'<color>870000ff</color> <width>10</width> </PolyStyle> </Style>' +
|
||||
'<Polygon><outerBoundaryIs><LinearRing><coordinates>' +
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2">
|
||||
<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>
|
||||
<NetworkLink><Link><href>spec/ol/parser/kml/polygon.kml</href></Link></NetworkLink>
|
||||
</Document>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2">
|
||||
<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">
|
||||
<Placemark>
|
||||
<name>Extended data placemark</name>
|
||||
<description>Attached to the ground. Intelligently places itself
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<kml xmlns="http://earth.google.com/kml/2.2">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://earth.google.com/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>
|
||||
<Placemark>
|
||||
<name>Easy trail</name>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/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>
|
||||
<Style id="pushpin">
|
||||
<IconStyle id="mystyle">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2">
|
||||
<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>LineString.kml</name>
|
||||
<open>1</open>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/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>
|
||||
<Camera>
|
||||
<gx:TimeStamp>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2">
|
||||
<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>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2">
|
||||
<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>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2">
|
||||
<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>
|
||||
<Placemark>
|
||||
<name>Simple placemark</name>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2">
|
||||
<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>
|
||||
<Placemark>
|
||||
<name>Simple placemark</name>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2">
|
||||
<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>
|
||||
<Placemark>
|
||||
<name>Simple placemark</name>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kml xmlns="http://www.opengis.net/kml/2.2">
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user