@types/leaflet.featuregroup.subgroup
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Installation

npm install --save @types/leaflet.featuregroup.subgroup

Summary

This package contains type definitions for leaflet.featuregroup.subgroup (https://github.com/ghybs/Leaflet.FeatureGroup.SubGroup).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet.featuregroup.subgroup.

index.d.ts

import * as L from "leaflet";

declare module "leaflet" {
    namespace FeatureGroup {
        /**
         * An extended FeatureGroup that adds its child layers into a parent
         * group when added to a map (e.g., through L.Control.Layers). Typical
         * usage is to dynamically add and remove groups of markers from marker
         * clusters.
         */
        class SubGroup<P = any> extends FeatureGroup<P> {
            /**
             * Instantiates a SubGroup.
             */
            constructor(parentGroup?: LayerGroup, layers?: Layer[]);

            /**
             * Changes the parent group into which child markers are added to or
             * removed from.
             */
            setParentGroup(parentGroup: LayerGroup): this;

            /**
             * Removes the current sub-group from map before changing the parent
             * group. Re-adds the sub-group to map if it was before changing.
             */
            setParentGroupSafe(parentGroup: LayerGroup): this;

            /**
             * Returns the current parent group.
             */
            getParentGroup(): LayerGroup;
        }
    }

    namespace featureGroup {
        /**
         * Creates a feature subgroup, optionally given an initial parent group and a set of layers.
         */
        function subGroup(parentGroup?: LayerGroup, layers?: Layer[]): FeatureGroup.SubGroup;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: @types/leaflet

Credits

These definitions were written by Thomas Revesz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/leaflet.featuregroup.subgroup

Weekly Downloads

588

Version

1.0.3

License

MIT

Unpacked Size

5.64 kB

Total Files

5

Last publish

Collaborators

  • types