/** @import {ImageOverlayOptions} from './ImageOverlay.js' */ /** @import {LatLngBoundsExpression} from '../geo/LatLngBounds.js' */ /** * Used to load, display and provide DOM access to an SVG file over specific bounds of * the map. Extends `ImageOverlay`. * * An SVG overlay uses the [``](https://developer.mozilla.org/docs/Web/SVG/Element/svg) * element; `getElement()` returns the instance of * [`SVGElement`](https://developer.mozilla.org/docs/Web/API/SVGElement) used by this * overlay. * * @example * ```js * const svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"); * svgElement.setAttribute('xmlns', "http://www.w3.org/2000/svg"); * svgElement.setAttribute('viewBox', "0 0 200 200"); * svgElement.innerHTML = ''; * const svgElementBounds = [ [ 32, -130 ], [ 13, -100 ] ]; * new SVGOverlay(svgElement, svgElementBounds).addTo(map); * ``` */ export class SVGOverlay extends ImageOverlay { /** * Instantiates an image overlay object given an SVG element and the geographical * bounds it is tied to. A viewBox attribute is required on the SVG element to zoom * in and out properly. * @overload * @param {SVGElement} svg * @param {LatLngBoundsExpression} bounds * @param {ImageOverlayOptions} [options] */ constructor(svg: SVGElement, bounds: LatLngBoundsExpression, options?: ImageOverlayOptions | undefined); } import { ImageOverlay } from './ImageOverlay.js'; import type { LatLngBoundsExpression } from '../geo/LatLngBounds.js'; import type { ImageOverlayOptions } from './ImageOverlay.js';