The <x-map-popup> component creates standalone popups anchored to specific coordinates on the map. Unlike marker popups, these are not attached to a marker and can be opened independently.
This is a standalone popup.
Automatically close the popup when the user pans or moves the map:
<x-map-popup :lat="51.505" :lng="-0.09" :open="true" :close-on-move="true" > <p>I'll close when you move the map!</p> </x-map-popup>
| Prop | Type | Default | Description |
|---|---|---|---|
| :lat | float | required | Latitude |
| :lng | float | required | Longitude |
| id | ?string | null | Unique identifier for events |
| :open | bool | true | Initial visibility |
| max-width | string | '300px' | CSS max-width (e.g., 'none') |
| :close-button | bool | false | Show the 'x' close button |
| :close-on-click-map | bool | true | Close when map is clicked |
| :close-on-move | bool | false | Close when the map camera moves |
| anchor | string | 'bottom' | Options: top, bottom, left, right, etc. |
| :offset | array | [0, 0] | Pixel offset [x, y] |
| class | string | '' | Additional CSS classes |