Add opaque option to olx.source.OSMOptions

This commit is contained in:
Frederic Junod
2016-02-02 13:42:05 +01:00
parent 39b9ba87fc
commit d8330d56a0
2 changed files with 10 additions and 1 deletions

View File

@@ -4573,6 +4573,7 @@ olx.source.TileDebugOptions.prototype.wrapX;
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* crossOrigin: (null|string|undefined),
* maxZoom: (number|undefined),
* opaque: (boolean|undefined),
* reprojectionErrorThreshold: (number|undefined),
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
* url: (string|undefined),
@@ -4612,6 +4613,14 @@ olx.source.OSMOptions.prototype.crossOrigin;
olx.source.OSMOptions.prototype.maxZoom;
/**
* Whether the layer is opaque. Default is `true`.
* @type {boolean|undefined}
* @api
*/
olx.source.OSMOptions.prototype.opaque;
/**
* Maximum allowed reprojection error (in pixels). Default is `0.5`.
* Higher values can increase reprojection performance, but decrease precision.

View File

@@ -33,7 +33,7 @@ ol.source.OSM = function(opt_options) {
goog.base(this, {
attributions: attributions,
crossOrigin: crossOrigin,
opaque: true,
opaque: options.opaque !== undefined ? options.opaque : true,
maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
tileLoadFunction: options.tileLoadFunction,