Add ol.source.KML defaultStyle option

This commit is contained in:
Tom Payne
2014-01-07 14:38:55 +01:00
parent 6b94baf291
commit dcd2853d2d
2 changed files with 4 additions and 1 deletions

View File

@@ -581,6 +581,7 @@
/** /**
* @typedef {Object} olx.source.KMLOptions * @typedef {Object} olx.source.KMLOptions
* @property {Array.<ol.Attribution>|undefined} attributions Attributions. * @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {Array.<ol.style.Style>|undefined} defaultStyle Default style.
* @property {Document|undefined} doc Document. * @property {Document|undefined} doc Document.
* @property {ol.Extent|undefined} extent Extent. * @property {ol.Extent|undefined} extent Extent.
* @property {string|undefined} logo Logo. * @property {string|undefined} logo Logo.

View File

@@ -18,7 +18,9 @@ ol.source.KML = function(opt_options) {
attributions: options.attributions, attributions: options.attributions,
doc: options.doc, doc: options.doc,
extent: options.extent, extent: options.extent,
format: new ol.format.KML(), format: new ol.format.KML({
defaultStyle: options.defaultStyle
}),
logo: options.logo, logo: options.logo,
node: options.node, node: options.node,
projection: options.projection, projection: options.projection,