Skip to content

Commit

Permalink
Add additional test CesiumGS#5819
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Bernstein committed Sep 29, 2017
1 parent b60dc73 commit 90dbfd5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Specs/Data/KML/simpleEmptyIconStyle.kml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark>
<Style>
<IconStyle>
</IconStyle>
</Style>
<description><![CDATA[image.png <a href="./image.png">image.png</a><img src="image.png"/>]]></description>
<Point>
<coordinates>1,2,3</coordinates>
</Point>
</Placemark>
</Document>
</kml>
12 changes: 12 additions & 0 deletions Specs/DataSources/KmlDataSourceSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,18 @@ defineSuite([
});
});

it('if load contains empty <IconStyle> tag for placemark, default yellow pin does show', function() {
var dataSource = new KmlDataSource(options);
return loadBlob('Data/KML/simpleEmptyIconStyle.kml').then(function(blob) {
return dataSource.load(blob);
}).then(function(source) {
expect(source.entities);
expect(source.entities.values.length).toEqual(1);
expect(source.entities._entities._array.length).toEqual(1);
expect(source.entities._entities._array[0]._billboard._image == dataSource._pinBuilder.fromColor(Color.YELLOW, 64));
});
});

it('sets DataSource name from Document', function() {
var kml = '<?xml version="1.0" encoding="UTF-8"?>\
<Document>\
Expand Down

0 comments on commit 90dbfd5

Please sign in to comment.