本文整理汇总了TypeScript中leaflet.Util.setOptions方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Util.setOptions方法的具体用法?TypeScript Util.setOptions怎么用?TypeScript Util.setOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类leaflet.Util
的用法示例。
在下文中一共展示了Util.setOptions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
initialize: function(url, options) {
L.Util.setOptions(this, options);
this._url = url;
this._cache = {};
// Find a unique id in window we can use for our callbacks
// Required for jsonP
let i = 0;
while (window['lu' + i]) {
i++;
}
this._windowKey = 'lu' + i;
window[this._windowKey] = {};
const subdomains = this.options.subdomains;
if (typeof this.options.subdomains === 'string') {
this.options.subdomains = subdomains.split('');
}
},
示例2:
const extended4: typeof obj1 & typeof obj2 & typeof obj3 & typeof obj4 & typeof obj5 = L.Util.extend(obj1, obj2, obj3, obj4, obj5);
L.Util.create({});
L.Util.create(null, {foo: {writable: true, value: 'bar'}});
L.Util.bind(() => {}, {});
L.Util.stamp({});
L.Util.throttle(() => {}, 123, {});
L.Util.wrapNum(123, []);
L.Util.wrapNum(123, [], true);
L.Util.falseFn();
L.Util.formatNum(123);
L.Util.formatNum(123, 1);
L.Util.trim('word ');
L.Util.splitWords('word word');
L.Util.setOptions({}, {});
L.Util.getParamString({});
L.Util.getParamString({}, '');
L.Util.getParamString({}, '', true);
L.Util.template('template', {});
L.Util.isArray({});
L.Util.indexOf([], {});
L.Util.requestAnimFrame(() => {});
L.Util.requestAnimFrame(timestamp => console.log(timestamp), {});
L.Util.requestAnimFrame(() => {}, {}, true);
L.Util.cancelAnimFrame(1);
L.Util.emptyImageUrl;
interface MyProperties {
testProperty: string;
}
示例3: initialize
, text: 1
, borderColor: defaults.iconColor
, borderWidth: 2
, borderStyle: "solid"
, backgroundColor: "white"
, textColor: defaults.iconColor
, customClasses: ""
, spin: false
, prefix: "fa"
, html: ""
},
initialize(options) {
this.applyDefaults(options);
this.options = (!options || !options.html) ? Util.setOptions(this, options) : options;
},
applyDefaults(options) {
if (options) {
if (!options.iconSize && options.iconShape) {
options.iconSize = defaults.iconSize[options.iconShape];
}
if (!options.iconAnchor && options.iconShape) {
options.iconAnchor = defaults.iconAnchor[options.iconShape];
}
if (!options.popupAnchor && options.iconShape) {
options.popupAnchor = defaults.popupAnchor[options.iconShape];