Retrospective guide for @un-fao/visualization@0.1.0-review.0. Read Start here for matching dependencies and limitations.
DataViewport forwards props to DeckGL. It accepts DeckGL component props except
children; it does not supply a basemap.
import { DataViewport } from '@un-fao/visualization';
export function ViewportExample() {
return (
<div style={{ position: 'relative', width: '100%', height: 400 }}>
<DataViewport
initialViewState={{ longitude: 12.5, latitude: 41.9, zoom: 6 }}
controller={true}
layers={[]}
/>
</div>
);
}
| Module | Import | Purpose | Why or when |
|---|---|---|---|
@un-fao/visualization |
DataViewport |
Runtime-required | Creates the standalone drawing surface. |
This minimal example intentionally draws no data. Pass a layer in layers, as
shown in the raster guide, to display a dataset.
initialViewState supplies the starting camera; controller explicitly enables
interaction. The wrapper adds no package-specific defaults.
See DataViewport and DataViewportProps for this release's full API. Use DataOverlay when an existing map owns the camera.