Skip to content

Commit

Permalink
Cover edge case where IconStyle tag is empty CesiumGS#5819
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Bernstein committed Oct 17, 2017
1 parent be26845 commit 470810d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/DataSources/KmlDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,12 @@ define([
var color = queryColorValue(node, 'color', namespaces.kml);

var iconNode = queryFirstNode(node, 'Icon', namespaces.kml);
var icon = getIconHref(iconNode, dataSource, sourceUri, uriResolver, false, query);
var icon;
if (!defined(iconNode)) {
icon = dataSource._pinBuilder.fromColor(Color.YELLOW, 64);
} else {
icon = getIconHref(iconNode, dataSource, sourceUri, uriResolver, false, query);
}
var x = queryNumericValue(iconNode, 'x', namespaces.gx);
var y = queryNumericValue(iconNode, 'y', namespaces.gx);
var w = queryNumericValue(iconNode, 'w', namespaces.gx);
Expand Down

0 comments on commit 470810d

Please sign in to comment.