Skip to content
Browse files

Fixing return type to make Closure compiler happy

  • Loading branch information...
1 parent f4a4522 commit bdfa2cc88c2f9b523fa228e02f714bf16899eef9 @ahocevar ahocevar committed Mar 2, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/ol/style/style.js
View
10 src/ol/style/style.js
@@ -56,16 +56,18 @@ ol.style.Style.prototype.apply = function(feature) {
* the feature.
*/
ol.style.Style.applyDefaultStyle = function(feature) {
- var type = feature.getGeometry().getType();
+ var type = feature.getGeometry().getType(),
+ symbolizerLiterals = [];
if (type === ol.geom.GeometryType.POINT ||
type === ol.geom.GeometryType.MULTIPOINT) {
- return [ol.style.ShapeDefaults];
+ symbolizerLiterals.push(ol.style.ShapeDefaults);
} else if (type === ol.geom.GeometryType.LINESTRING ||
type === ol.geom.GeometryType.MULTILINESTRING) {
- return [ol.style.LineDefaults];
+ symbolizerLiterals.push(ol.style.LineDefaults);
} else if (type === ol.geom.GeometryType.LINEARRING ||
type === ol.geom.GeometryType.POLYGON ||
type === ol.geom.GeometryType.MULTIPOLYGON) {
- return [ol.style.PolygonDefaults];
+ symbolizerLiterals.push(ol.style.PolygonDefaults);
}
+ return symbolizerLiterals;
};

0 comments on commit bdfa2cc

Please sign in to comment.
Something went wrong with that request. Please try again.