I currently have users on a map, set with a user field called Active set to Yes/No.
Those active users show on map.
However I need a button which will let the user select how long they wish to be shown on the map.
For example if a user selects 5 minute sessions, then they will be shown on the map for only 5 minutes. And if another user selects 10 minute sessions then they will be shown on the map for only 10 minutes.
I’d have a value set for the user (say hiddenTime) which is current time + Interval (which is the value the user sets 5 mins, 10 mins etc) then you use a conditional to hide the element once the current time is > hiddenTime
I use this to display a graphic (or hide it) when user details are modified in one app as per below
Of course if you are feeling sassy you could take @keith 's advice and Hulk smash everything in disgust at the the recent pricing changes but you might lose users that way
No need for API’s here and no need to upgrade, this is just a simple timestamp action attached to a user. When a map is shown you are doing a calculation on the timestamp plus the users display interval and either hiding the user or making them visible.
Is your suggestion valid even if the user clear’s cache or signs out before the 5 minutes end?
It seems it will only work if the user’s browser is open.
Yes, even if they sign out the value attached to the user is still there for others to see.
You would need to set up permissions for others to be able to see the username and the hiddenTime field assuming you have privacy rules applied to your Users table (which you should have)
I think this cannot work because you are trying to hide an element, while I am trying to hide a marker on the map. I don’t see how I can add a conditional to a user’s marker on the map.