# ResourceMap

Present Resource points through MapLibre.

## Public import

```svelte
<script lang="ts">
  import { ResourceMap } 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: `ResourceMap`.

## Declared props

This declaration comes from the installed package. Imported types retain their upstream meaning.

```ts
type Props = {
    map?: MapInstance | null;
    children?: Snippet;
    points: readonly MapResourcePoint[];
    selectedId: string | null;
    authorityToken: unknown;
    recoveryToken?: unknown;
    onSelect: (
      id: string,
    ) => CompositionCommandResult | Promise<CompositionCommandResult>;
    label: string;
    failedLabel: string;
    unknownLabel: string;
    mapOptions?: Omit<ComponentProps<typeof Map>, "children" | "label" | "map">;
    controls?: ComponentProps<typeof MapControls>;
    maxPoints?: number;
    disabled?: boolean;
  };
```

## Source and version

ROM UI **0.1.0-alpha.7**. [Component source](https://github.com/pmikstacki/rom-ui/blob/v0.1.0-alpha.7/src/lib/maps/ResourceMap.svelte).

Install the optional `maplibre-gl` peer and its styles. Provider contracts and attribution remain host responsibilities.

See [the composition guide](/docs/studio-compositions/) for host integration boundaries.
