What follows is some light documentation on how stac-map is built.
Here's the two core concepts of stac-map.
stac-map is driven by one (and only one) href value, which is a URI to a remote file or the name of an uploaded file.
The href is stored in the app state and is synchronized with a URL parameter, which allows the sharing of links to stac-map pointed at a specific STAC value.
Once the href is set, the data at the href is loaded into the app as a single value.
The value could be:
- A STAC Catalog, Collection, or Item
- A STAC API
- A GeoJSON FeatureCollection with STAC Items as its
features(commonly referred to as anItemCollection, though no such term exists in the STAC specification) - A stac-geoparquet file, which is treated as an
ItemCollection.
The behaviors of the app are then driven by the attributes of the value, especially via value.tsx.