Ensure styles are defined in FeaturesOverlay

This commit is contained in:
Antoine Abt
2014-02-03 16:37:04 +01:00
parent 933ef64db1
commit 1c4926b591

View File

@@ -149,6 +149,9 @@ ol.FeatureOverlay.prototype.handleMapPostCompose_ = function(event) {
var i, ii, feature, styles;
this.features_.forEach(function(feature) {
styles = this.styleFunction_(feature, resolution);
if (!goog.isDefAndNotNull(styles)) {
return;
}
ii = styles.length;
for (i = 0; i < ii; ++i) {
vectorContext.drawFeature(feature, styles[i]);