ol.Attribution is a single-arg constructor
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @typedef {Object} ol.AttributionOptions
|
||||
* @property {string} html HTML markup for this attribution.
|
||||
* @property {Object.<string, Array.<ol.TileRange>>|undefined} tileRanges
|
||||
* Tile ranges (FOR INTERNAL USE ONLY).
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} ol.DeviceOrientationOptions
|
||||
* @property {boolean|undefined} tracking Tracking.
|
||||
|
||||
@@ -1 +1 @@
|
||||
@exportSymbol ol.Attribution
|
||||
@exportClass ol.Attribution ol.AttributionOptions
|
||||
|
||||
@@ -11,31 +11,31 @@ goog.require('ol.TileRange');
|
||||
*
|
||||
* source: new ol.source.OSM({
|
||||
* attributions: [
|
||||
* new ol.Attribution(
|
||||
* 'All maps © ' +
|
||||
* '<a href="http://www.opencyclemap.org/">OpenCycleMap</a>'),
|
||||
* new ol.Attribution({
|
||||
* html: 'All maps © ' +
|
||||
* '<a href="http://www.opencyclemap.org/">OpenCycleMap</a>'
|
||||
* }),
|
||||
* ol.source.OSM.DATA_ATTRIBUTION
|
||||
* ],
|
||||
* ..
|
||||
*
|
||||
* @constructor
|
||||
* @param {string} html The markup to use for display of the attribution.
|
||||
* @param {Object.<string, Array.<ol.TileRange>>=} opt_tileRanges Tile ranges
|
||||
* (FOR INTERNAL USE ONLY).
|
||||
* @param {ol.AttributionOptions} options Attribution options.
|
||||
*/
|
||||
ol.Attribution = function(html, opt_tileRanges) {
|
||||
ol.Attribution = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {string}
|
||||
*/
|
||||
this.html_ = html;
|
||||
this.html_ = options.html;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<string, Array.<ol.TileRange>>}
|
||||
*/
|
||||
this.tileRanges_ = opt_tileRanges || null;
|
||||
this.tileRanges_ = goog.isDef(options.tileRanges) ?
|
||||
options.tileRanges : null;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user