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

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

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