@tianditu/wc
Version:
Web components for tianditu, powered by Demo Macro.
5 lines • 713 B
JavaScript
/*!
* MIT © Demo Macro
*/
import{r as e,h as t,H as s}from"./p-b9380f31.js";import{o as i}from"./p-9e404b55.js";const n=class{constructor(t){e(this,t);this.position="bottomleft";this.color=undefined;this.uniqueId=undefined;this.control=undefined;this.map=undefined}connectedCallback(){i((()=>{this.map=globalThis[this.uniqueId];this.control=new T.Control.Scale({position:this.position});this.map.addControl(this.control)}))}componentWillRender(){i((()=>{this.color&&this.control.setColor(this.color)}))}render(){return t(s,{key:"8aadccd6ea8ebf1f0f26bd22e64b45e5555c1f29"},t("slot",{key:"e71e4d337a9c1de44b13eb205767e3ad6c122f06"}))}};export{n as tdt_control_scale};
//# sourceMappingURL=p-e6109a38.entry.js.map