Show device markers based search user Thingsboard?
Problem Description:
I’m using Thingsboard version 3.4.1, I want to display markers on the maps Thingsboard widget based on user search Input. So when the user searches for the item device that appears on the maps, only the device that matches the user’s search.
How do I display the map icon that the user is looking for?
Thanks in advance.
Solution – 1
You need Filter
feature:
- Create widget with HTML
input
field. - Every time when user types, you need to create/update
USER
attribute (example) to save search text in it. - Create dashboard filter that will compare device name or label with search text (use
contain
ornot contains
comparison functions). - Add filter from step 3 to map widget.