Search code examples
leafletmapsopenstreetmapthingsboard

How do you auto zoom maps marker on Thingsboard?


So I have 2 Table widgets and a Maps Widget on the Thingsboard, when I click an item in the list table, I want the maps to auto zoom to the marker in the second Maps Widget on the Thingsboard?

How to auto zoom on Maps Thingsboard with type openstreetmaps?


Solution

  • I would make two dashboards.

    First one is the one you already have, so the map of all Devices/Assets and Table. On click of some table row set and action to navigate to new dashboard state.

    Second dashboard is the one that opens up upon that previous action, and also has alias that will take dashboard state and point to clicked Device/Asset. With that, you can have a map that will show only that clicked Device/Asset and therefor zoom onto it.