Skip to content

Commit 16dab59

Browse files
CopilotzenitraM
andcommitted
Add documentation for embedding map with collapsed sidebar
Co-authored-by: zenitraM <863975+zenitraM@users.noreply.github.com>
1 parent 2588e33 commit 16dab59

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,34 @@ export MALLA_DATA_RETENTION_HOURS=168
327327

328328
Set to `0` (default) to disable cleanup completely.
329329

330+
## Embedding the Map
331+
332+
The map view can be embedded in other websites or used in a narrower width by collapsing the sidebar by default. This is particularly useful when you want to showcase your mesh network on your website or integrate it into other pages.
333+
334+
### URL Parameter
335+
336+
Add `?sidebar-collapsed=true` or `?sidebar-collapsed=1` to the map URL to collapse the sidebar by default:
337+
338+
```
339+
https://your-malla-instance.com/map?sidebar-collapsed=true
340+
```
341+
342+
The sidebar can still be expanded by users clicking the toggle button, giving them access to filters, statistics, and controls when needed.
343+
344+
### Embedding Example
345+
346+
```html
347+
<iframe
348+
src="https://your-malla-instance.com/map?sidebar-collapsed=true"
349+
width="100%"
350+
height="600"
351+
frameborder="0"
352+
style="border: 0;">
353+
</iframe>
354+
```
355+
356+
This approach maximizes the visible map area while keeping full functionality accessible through the expandable sidebar.
357+
330358
## Contributing
331359

332360
Feel free to submit issues, feature requests, or pull requests to improve Malla!

0 commit comments

Comments
 (0)