UNPKG

422 BJavaScriptView Raw
1import { createElementObject, createLayerComponent, extendContext } from '@react-leaflet/core';
2import { LayerGroup as LeafletLayerGroup } from 'leaflet';
3export const LayerGroup = createLayerComponent(function createLayerGroup({ children: _c , ...options }, ctx) {
4 const group = new LeafletLayerGroup([], options);
5 return createElementObject(group, extendContext(ctx, {
6 layerContainer: group
7 }));
8});