4. PrintTool
Add MlCreatePdfButton-Component
-
Import MlCreatePdfButton-Component:
import {MlCreatePdfButton} from "@mapcomponents/react-maplibre"
insrc/App.jsx
. -
Add MlCreatePdfButton to the Toptoolbar:
<TopToolbar unmovableButtons={
<>
<Button id="sidebar" variant="contained" onClick={setShowSidebar(!showSidebar)}}>
Sidepane
</Button>
<Button id="print">
<MlCreatePdfButton />
</Button>
</>
}
/>There are two components to choose from to create PDF's. The
MlCreatePdfButton
andMlCreatePdfForm
.MlCreatePdfForm
can be added to the sidepane or a dialog,MlCreatePdfButton
is developed especially for mobil applications.To learn more see MlCreatePdfButton.