Skip to main content

MlScaleReference

This Component adds a scale either as an overlay or toolbar.

Usage as an overlay

import { MlScaleReference } from "@mapcomponents/react-maplibre";
<div
style={{
bottom: "8px",
left: "10px",
position: "absolute",
zIndex: 1000,
}}
>
<MlScaleReference />
</div>

Usage in toolbar

import { MlScaleReference } from "@mapcomponents/react-maplibre";
import { TopToolbar } from "@mapcomponents/react-maplibre";
<TopToolbar unmovableButtons={<MlScaleReference />} />