qd-changjing/public/leaflet/libs/gtc2017/dist/iclient9-mapboxgl.min.js

9 lines
20 KiB
JavaScript
Raw Normal View History

2022-07-18 11:08:34 +08:00
/*!
*
* iclient9-mapboxgl.(http://iclient.supermap.io)
* Copyright© 2000-2017 SuperMap Software Co. Ltd
* license: Apache-2.0
* version: v9.0.0
*
*/
!function(e){function t(i){if(n[i])return n[i].exports;var a=n[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t){e.exports=mapboxgl},function(e,t){e.exports=function(){try{return mapv}catch(e){return{}}}()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=i(n(0)),s=i(n(8)),l=t.Logo=function(){function e(t){a(this,e),this.imageUrl=null,this.link=null,this.width=null,this.height=null,this.alt="SuperMap iClient",this._extend(this,t)}return o(e,[{key:"onAdd",value:function(e){this._map=e,this._container=document.createElement("div"),this._container.className="mapboxgl-ctrl iclient-logo",this._container.style.marginTop=0,this._container.style.marginBottom=0,this._container.style.marginLeft=0,this._container.style.marginRight=0;var t=s.default;this.imageUrl&&(t=this.imageUrl);var n=this.alt,i="94px",a="29px",o="width:"+i+";height:"+a+";";this.imageUrl&&(o="width:"+(i=this.width)+";height:"+(a=this.height)+";",i&&a||(o=""));var r=this.link||"http://iclient.supermap.io";return this._container.innerHTML="<a href='"+r+"' target='_blank'><img src="+t+" alt='"+n+"' style='"+o+"margin-bottom: 2px'></a>",this._createStyleSheet(),this._container}},{key:"_createStyleSheet",value:function(){var e=document.createElement("style");e.type="text/css",e.innerHTML=".iclient-logo{margin:0 !important;}.iclient-logo a{border: none;display: block;height:31px;}.iclient-logo img{border: none;white-space: nowrap}",document.getElementsByTagName("head")[0].appendChild(e)}},{key:"_extend",value:function(e){var t=!0,n=!1,i=void 0;try{for(var a,o=arguments[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var r=a.value;for(var s in r)e[s]=r[s]}}catch(e){n=!0,i=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw i}}return e}}]),e}();r.default.supermap=r.default.supermap||{},r.default.supermap.LogoControl=l},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.MapvLayer=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=i(n(7)),s=i(n(0)),l=t.MapvLayer=function(){function e(t,n,i){a(this,e),this.map=t,this.renderer=new r.default(t,this,n,i),this.canvas=this._createCanvas(),this.renderer._canvasUpdate(),this.mapContainer=t.getCanvasContainer(),this.mapContainer.appendChild(this.canvas)}return o(e,[{key:"getTopLeft",value:function(){var e,t=this.map;return t&&(e=t.getBounds().getNorthWest()),e}},{key:"show",value:function(){return this.renderer&&this.renderer._show(),this}},{key:"hide",value:function(){return this.renderer&&this.renderer._hide(),this}},{key:"_createCanvas",value:function(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.width=parseInt(this.map.getCanvas().style.width),e.height=parseInt(this.map.getCanvas().style.height),e.style.width=this.map.getCanvas().style.width,e.style.height=this.map.getCanvas().style.height,e}}]),e}();s.default.supermap=s.default.supermap||{},s.default.supermap.MapvLaye