@tianditu/wc
Version:
Web components for tianditu, powered by Demo Macro.
43 lines (38 loc) • 1.36 kB
JavaScript
/*!
* MIT © Demo Macro
*/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-75a53569.js');
const use = require('./use-c678b375.js');
const TdtControlZoom = class {
constructor(hostRef) {
index.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() {
use.onload(() => {
this.map = globalThis[this.uniqueId];
this.control = new T.Control.Zoom(use.filterProps({
position: this.position,
zoomInText: this.zoomInText,
zoomInTitle: this.zoomInTitle,
zoomOutText: this.zoomOutText,
zoomOutTitle: this.zoomOutTitle,
}));
this.map.addControl(this.control);
});
}
render() {
return (index.h(index.Host, { key: '773062392af8eba280a0c89174f51f29e0f7d16f' }, index.h("slot", { key: '244b2ba65daf8eb0e2335b68cff94dd268929347' })));
}
};
exports.tdt_control_zoom = TdtControlZoom;
//# sourceMappingURL=tdt-control-zoom.cjs.entry.js.map