Reusable GIS blocks for Studio map apps
  • HTML 46.8%
  • JavaScript 42.8%
  • CSS 10.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
rvba 4d2955f939 fix(marker-popup): use a feature group for bounds
LayerGroup has no getBounds(); FeatureGroup does, so fitBounds works.
2026-10-31 16:38:22 +01:00
blocks fix(marker-popup): use a feature group for bounds 2026-10-31 16:38:22 +01:00
shared/vendor/leaflet feat(blocks): seed the GIS block library 2026-10-31 16:33:38 +01:00
gis.yaml feat(blocks): seed the GIS block library 2026-10-31 16:33:38 +01:00
LICENSE chore: add the MIT license 2026-10-31 16:37:48 +01:00
README.md feat(blocks): seed the GIS block library 2026-10-31 16:33:38 +01:00

gis-src

Reusable GIS blocks for Studio map apps.

gis-src is a library, not an application. Each block is a small, self-contained piece of a static Leaflet map: a base layer, a data layer, a marker layer or a control. Studio reads the catalogue, picks blocks for a prompt, inlines their functions into a single-file app, and saves the result in bimr/gis-apps.

Layout

gis.yaml                 catalogue of blocks and vendor assets
blocks/<id>/             one self-contained block
  block.yaml             authoritative contract
  README.md              what it does and how to use it
  preview.png            visual preview
  src/<id>.js            plain function, no imports
  src/<id>.css           optional styles
  example/index.html     minimal standalone example
shared/vendor/leaflet/   pinned Leaflet 1.9.4 assets

The gis.yaml catalogue is an index; the block.yaml in each block directory is the source of truth. A block defines plain functions that receive map (or a parent element) and plain options, and return the Leaflet layer/control handle. The static POC inlines those functions; it does not use import/export.

Rules

  • No global state, no hard-coded app data, no public Nominatim/Overpass calls.
  • Every external dependency is declared in block.yaml.
  • Every block has an example, a preview, a license and attribution.
  • Keep tile URLs and app data in the app's config, never in a block.

License

MIT for the blocks. Leaflet is BSD-2-Clause; see shared/vendor/leaflet/LICENSE.