Integrating with React
Embedding with useFeltEmbed
useFeltEmbedfunction MyComponent() {
// get the felt controller (or null if it's not loaded yet) and a ref to the map container
// into which we can embed the map
const { felt, mapRef } = useFeltEmbed("wPV9BqMuYQxmUraVWy9C89BNA", {
uiControls: {
cooperativeGestures: false,
fullScreenButton: false,
showLegend: false,
},
});
return (
<div>
{/* the map container */}
<div ref={mapRef} />
{/* a component that uses the Felt controller */}
<MyFeltApp felt={felt} />
</div>
);
}Getting live data
Last updated
Was this helpful?