mapbox-layer-groups
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

mapbox-layer-groups

A library for managing groups of layers in mapbox. Based on https://github.com/mapbox/mapbox-gl-layer-groups.

Extends the Map API with the following methods:

map.addLayerGroup(id, [layers])
map.addLayerToGroup(id, layer)
map.removeLayerGroup(id)
map.getLayerGroup(id)

Additionally, adds a built-in layer group for geoJson (a circle layer for non-clustered points, a fill and line layer for polygons, and a line layer for linestrings).

map.addSource(id, { type: 'geojson', ... })
map.addLayerGroup(id, createGeoJsonGroup({
    id: 'layer'
    source: id,
    ...
}))

Package Sidebar

Install

npm i mapbox-layer-groups

Weekly Downloads

1

Version

0.0.6

License

MIT

Unpacked Size

64.3 kB

Total Files

26

Last publish

Collaborators

  • beilinson