From dcd2853d2dc3ff9d4b9ea0b6f158ff4dcc98368a Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 7 Jan 2014 14:38:55 +0100 Subject: [PATCH] Add ol.source.KML defaultStyle option --- src/objectliterals.jsdoc | 1 + src/ol/source/kmlsource.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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,