@tianditu/wc
Version:
Web components for tianditu, powered by Demo Macro.
39 lines (36 loc) • 1.3 kB
JavaScript
/*!
* MIT © Demo Macro
*/
import { r as registerInstance, h, H as Host } from './index-0cd9c6b6.js';
import { o as onload, f as filterProps } from './use-ccb66c1b.js';
const TdtControlZoom = class {
constructor(hostRef) {
registerInstance(this, hostRef);
this.position = "topleft";
this.zoomInText = undefined;
this.zoomInTitle = undefined;
this.zoomOutText = undefined;
this.zoomOutTitle = undefined;
this.uniqueId = undefined;
this.control = undefined;
this.map = undefined;
}
connectedCallback() {
onload(() => {
this.map = globalThis[this.uniqueId];
this.control = new T.Control.Zoom(filterProps({
position: this.position,
zoomInText: this.zoomInText,
zoomInTitle: this.zoomInTitle,
zoomOutText: this.zoomOutText,
zoomOutTitle: this.zoomOutTitle,
}));
this.map.addControl(this.control);
});
}
render() {
return (h(Host, { key: '773062392af8eba280a0c89174f51f29e0f7d16f' }, h("slot", { key: '244b2ba65daf8eb0e2335b68cff94dd268929347' })));
}
};
export { TdtControlZoom as tdt_control_zoom };
//# sourceMappingURL=tdt-control-zoom.entry.js.map