This is an example of using @arenarium/maps with React.
The floating panel lets you try the markers of the library:
- Markers: insert a number of random markers in the visible area, and clear them.
- Orientation: switch the tooltips and popups between dynamic and centered.
- Select: click a tooltip to select its marker, or move the map to a random marker.
- Popups: show or hide the popup of the selected marker.
The library logic is in src/lib/library.tsx. The pin, tooltip and popup are React components that render lazily, each in its own React root, in the initialize callback of each element.
- Add your API key to
.env:VITE_API_KEY=... pnpm installpnpm dev