Set constants of KML format even if a default style is provided

This commit is contained in:
oterral committed 2016-10-28 14:53:44 +02:00
1 parent 04f070b159
commit f369ea2e29
2 files changed
+2813 -2764

No files matched your search

+5 -2
View File
@@ -51,6 +51,10 @@ ol.format.KML = function(opt_options) {
ol.format.XMLFeature.call(this);
if (!ol.format.KML.DEFAULT_STYLE_ARRAY_) {
ol.format.KML.createStyleDefaults_();
}
/**
* @inheritDoc
*/
@@ -61,8 +65,7 @@ ol.format.KML = function(opt_options) {
* @type {Array.<ol.style.Style>}
*/
this.defaultStyle_ = options.defaultStyle ?
options.defaultStyle :
(ol.format.KML.DEFAULT_STYLE_ARRAY_ || ol.format.KML.createStyleDefaults_());
options.defaultStyle : ol.format.KML.DEFAULT_STYLE_ARRAY_;
/**
* @private