Add ol.source.KML defaultStyle option
This commit is contained in:
@@ -581,6 +581,7 @@
|
||||
/**
|
||||
* @typedef {Object} olx.source.KMLOptions
|
||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||
* @property {Array.<ol.style.Style>|undefined} defaultStyle Default style.
|
||||
* @property {Document|undefined} doc Document.
|
||||
* @property {ol.Extent|undefined} extent Extent.
|
||||
* @property {string|undefined} logo Logo.
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user