You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
837 B
TypeScript
24 lines
837 B
TypeScript
import { LayerGroup } from 'leaflet';
|
|
import {
|
|
WithProps,
|
|
type LeafletAddEventListener,
|
|
type LeafletElementConstructor,
|
|
type LeafletRemoveEventListener,
|
|
} from '../core/with-props.ts';
|
|
import type { GroupEvents } from '../core/event-types.ts';
|
|
|
|
const PROPS: Record<never, never> = {};
|
|
const Base: LeafletElementConstructor<LayerGroup, typeof PROPS> = WithProps(PROPS);
|
|
|
|
// A passthrough container: it has no options of its own, and children add
|
|
// themselves to it through the standard registration bubble.
|
|
export default class LeafletLayerGroupElement extends Base {
|
|
declare readonly leafletObject?: LayerGroup;
|
|
declare addEventListener: LeafletAddEventListener<GroupEvents>;
|
|
declare removeEventListener: LeafletRemoveEventListener<GroupEvents>;
|
|
|
|
createLeafletObject(): LayerGroup {
|
|
return new LayerGroup([]);
|
|
}
|
|
}
|