5 lines
10 KiB
JavaScript
5 lines
10 KiB
JavaScript
|
/*! leaflet.nontiledlayer - v1.0.7 - 2017-10-21 */
|
||
|
|
||
|
|
||
|
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,(b.L||(b.L={})).NonTiledLayer=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){(function(a){"use strict";var c="undefined"!=typeof window?window.L:void 0!==a?a.L:null;c.NonTiledLayer.WMS=c.NonTiledLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},options:{crs:null,uppercase:!1},initialize:function(a,b){this._wmsUrl=a;var d=c.extend({},this.defaultWmsParams);for(var e in b)c.NonTiledLayer.prototype.options.hasOwnProperty(e)||c.Layer&&c.Layer.prototype.options.hasOwnProperty(e)||(d[e]=b[e]);this.wmsParams=d,c.setOptions(this,b)},onAdd:function(a){this._crs=this.options.crs||a.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var b=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[b]=this._crs.code,c.NonTiledLayer.prototype.onAdd.call(this,a)},getImageUrl:function(a,b,d){var e=this.wmsParams;e.width=b,e.height=d;var f=this._crs.project(a.getNorthWest()),g=this._crs.project(a.getSouthEast()),h=this._wmsUrl,i=i=(this._wmsVersion>=1.3&&this._crs===c.CRS.EPSG4326?[g.y,f.x,f.y,g.x]:[f.x,g.y,g.x,f.y]).join(",");return h+c.Util.getParamString(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+i},setParams:function(a,b){return c.extend(this.wmsParams,a),b||this.redraw(),this}}),c.nonTiledLayer.wms=function(a,b){return new c.NonTiledLayer.WMS(a,b)},b.exports=c.NonTiledLayer.WMS}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(a,b,c){(function(a){"use strict";var c="undefined"!=typeof window?window.L:void 0!==a?a.L:null;c.NonTiledLayer=(c.Layer||c.Class).extend({includes:c.Evented||c.Mixin.Events,emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAHAAACH5BAUAAAAALAAAAAABAAEAAAICRAEAOw==",options:{attribution:"",opacity:1,zIndex:void 0,minZoom:0,maxZoom:18,pointerEvents:null,errorImageUrl:"data:image/gif;base64,R0lGODlhAQABAHAAACH5BAUAAAAALAAAAAABAAEAAAICRAEAOw==",bounds:c.latLngBounds([-85.05,-180],[85.05,180]),useCanvas:void 0},key:"",initialize:function(a){c.setOptions(this,a)},onAdd:function(a){this._map=a,void 0===this._zoomAnimated&&(this._zoomAnimated=c.DomUtil.TRANSITION&&c.Browser.any3d&&!c.Browser.mobileOpera&&this._map.options.zoomAnimation),c.version<"1.0"&&this._map.on(this.getEvents(),this),this._div||(this._div=c.DomUtil.create("div","leaflet-image-layer"),this.options.pointerEvents&&(this._div.style["pointer-events"]=this.options.pointerEvents),void 0!==this.options.zIndex&&(this._div.style.zIndex=this.options.zIndex),void 0!==this.options.opacity&&(this._div.style.opacity=this.options.opacity)),this.getPane().appendChild(this._div);var b=!!window.HTMLCanvasElement;void 0===this.options.useCanvas?this._useCanvas=b:this._useCanvas=this.options.useCanvas,this._useCanvas?(this._bufferCanvas=this._initCanvas(),this._currentCanvas=this._initCanvas()):(this._bufferImage=this._initImage(),this._currentImage=this._initImage()),this._update()},getPane:function(){return c.Layer?c.Layer.prototype.getPane.call(this):(this.options.pane?this._pane=this.options.pane:this._pane=this._map.getPanes().overlayPane,this._pane)},onRemove:function(a){c.version<"1.0"&&this._map.off(this.getEvents(),this),this.getPane().removeChild(this._div),this._useCanvas?(this._div.removeChild(this._bufferCanvas),this._div.removeChild(this._currentCanvas)):(this._div.
|
||
|
//# sourceMappingURL=NonTiledLayer.js.map
|