L.Control.ReloadTiles = L.Control.extend({ options: { position: 'bottomleft', autoreload_enable: true, autoreload_minInterval: 30, autoreload_interval: 120, autoreload_defaultOn: false, layers: [] }, onAdd: function (map) { var name = 'control-reloadtiles', container = L.DomUtil.create('div', name + ' webmap-control'); var stop = L.DomEvent.stopPropagation; L.DomEvent .on (container, 'mousemove', stop) .on (container, 'click', stop) .on (container, 'mousedown', stop) .on (container, 'dblclick', stop); this._map = map; this._reloadbutton = $("") .addClass (name+"-btn") .text ("Reload tiles now") .attr ("href", "#") .attr ("title", "Reload tiles now") .on ("click.action", null, this, this._reload); $(container).append (this._reloadbutton); if (this.options.autoreload_enable) { $(container).append ("
"); this._autocheck = $("") .addClass (name + "-chk") .attr ("type", "checkbox") .attr ("name", "map_reloadtiles_autoreload") .attr ("id", "map_reloadtiles_autoreload") .attr ("value", "1") .on ("change", null, this, this._selectreload); if (this.options.autoreload_defaultOn) { this._autocheck.attr ("checked", "checked"); this._timeout = window.setTimeout ($.proxy (this._reloadTilesEvent, this), this.options.autoreload_interval*1000); } $(container).append (this._autocheck); var label1 = $("