diff --git a/src/l-map.js b/src/l-map.js index ac3d160..7e1ba2b 100644 --- a/src/l-map.js +++ b/src/l-map.js @@ -54,7 +54,12 @@ class LMap extends HTMLElement { } connectedCallback() { - this.map = L.map(this, { zoomControl: this.hasAttribute("zoom-control") }); + let opts = {} + if (this.hasAttribute("zoom-control")) { + // TODO: decide the best ergonomics for this. + opts.zoomControl = this.getAttribute("zoom-control") !== "off" + } + this.map = L.map(this, opts); // Allow listeners to know when the map is "ready" this.map.whenReady(() => {