Skip to main content
Api

useScriptMapLibre

Use useScriptMapLibre() when you need direct access to the MapLibre namespace or are building your own map component.

const { onLoaded } = useScriptMapLibre()

onLoaded(({ maplibregl }) => {
  const bounds = new maplibregl.LngLatBounds(points)
  // Use the MapLibre API directly.
})
Was this page helpful?