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
|
* @typedef {Object} ol.DeviceOrientationOptions
|
||||||
* @property {boolean|undefined} tracking Tracking.
|
* @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({
|
* source: new ol.source.OSM({
|
||||||
* attributions: [
|
* attributions: [
|
||||||
* new ol.Attribution(
|
* new ol.Attribution({
|
||||||
* 'All maps © ' +
|
* html: 'All maps © ' +
|
||||||
* '<a href="http://www.opencyclemap.org/">OpenCycleMap</a>'),
|
* '<a href="http://www.opencyclemap.org/">OpenCycleMap</a>'
|
||||||
|
* }),
|
||||||
* ol.source.OSM.DATA_ATTRIBUTION
|
* ol.source.OSM.DATA_ATTRIBUTION
|
||||||
* ],
|
* ],
|
||||||
* ..
|
* ..
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {string} html The markup to use for display of the attribution.
|
* @param {ol.AttributionOptions} options Attribution options.
|
||||||
* @param {Object.<string, Array.<ol.TileRange>>=} opt_tileRanges Tile ranges
|
|
||||||
* (FOR INTERNAL USE ONLY).
|
|
||||||
*/
|
*/
|
||||||
ol.Attribution = function(html, opt_tileRanges) {
|
ol.Attribution = function(options) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
this.html_ = html;
|
this.html_ = options.html;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {Object.<string, Array.<ol.TileRange>>}
|
* @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