Skip to main content
Api

<ScriptLeafletGeoJson>

Adds inline GeoJSON through L.geoJSON. Replacing data clears and repopulates the existing layer; changing options.style updates its path style.

Remote fetching is intentionally outside the component. Fetch and validate data with useFetch, then pass the resulting object to data so loading and failure states remain explicit.

Was this page helpful?