MapControls
Present viewport controls for zoom, orientation and location..
Present viewport controls for zoom, orientation and location.
Public import
svelte
<script lang="ts">
import { MapControls } from "rom-ui/maps";
import "rom-studio/styles";
</script> Composition and responsibility
The host supplies data, callbacks and application policy. The component does not provide persistence or authorization.
Public names: MapControls.
Declared props
This declaration comes from the installed package. Imported types retain their upstream meaning.
ts
interface Props {
labels?: Partial<{
zoomIn: string;
zoomOut: string;
compass: string;
locate: string;
fullscreen: string;
locationFailed: string;
}>;
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
showZoom?: boolean;
showCompass?: boolean;
showLocate?: boolean;
showFullscreen?: boolean;
class?: string;
onlocate?: (coords: { longitude: number; latitude: number }) => void;
} Source and version
ROM UI 0.1.0-alpha.7. Component source.
Install the optional maplibre-gl peer and its styles. Provider contracts and attribution remain host responsibilities.
See the composition guide for host integration boundaries.
This page follows the captured repository source.View the source