diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index 6751f8d610..bc47d517be 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -581,6 +581,7 @@ /** * @typedef {Object} olx.source.KMLOptions * @property {Array.|undefined} attributions Attributions. + * @property {Array.|undefined} defaultStyle Default style. * @property {Document|undefined} doc Document. * @property {ol.Extent|undefined} extent Extent. * @property {string|undefined} logo Logo. diff --git a/src/ol/source/kmlsource.js b/src/ol/source/kmlsource.js index a10a5be288..9b645fb372 100644 --- a/src/ol/source/kmlsource.js +++ b/src/ol/source/kmlsource.js @@ -18,7 +18,9 @@ ol.source.KML = function(opt_options) { attributions: options.attributions, doc: options.doc, extent: options.extent, - format: new ol.format.KML(), + format: new ol.format.KML({ + defaultStyle: options.defaultStyle + }), logo: options.logo, node: options.node, projection: options.projection,