@tianditu/wc
Version:
Web components for tianditu, powered by Demo Macro.
5 lines • 802 B
JavaScript
/*!
* MIT © Demo Macro
*/
import{r as t,h as s,H as i}from"./p-b9380f31.js";import{o as e}from"./p-9e404b55.js";const n=class{constructor(s){t(this,s);this.position="topright";this.content=undefined;this.uniqueId=undefined;this.control=undefined;this.map=undefined}connectedCallback(){e((()=>{this.map=globalThis[this.uniqueId];this.control=new T.Control.Copyright({position:this.position});this.map.addControl(this.control)}))}componentWillRender(){e((()=>{this.content&&this.control.addCopyright({id:(new Date).getTime().toString(),content:this.content,bounds:this.map.getBounds()})}))}render(){return s(i,{key:"c47393902b2702af1fa363f28d9fa73a462bbd6a"},s("slot",{key:"b68b8a93d66f05646cdd389cd923f5b10a05229d"}))}};export{n as tdt_control_copyright};
//# sourceMappingURL=p-5634353b.entry.js.map