As dynamic generation of elements is currently not available from what I've gathered, I'm looking to get some feedback on my current plan of attack from some veterans
I have an overview page with a site-layout. On this page we'll be plotting the GPS-position of a little over a hundred pieces of mobile equipment. This number may in- or decrease in the future, but the final count is managed via the tagbrowser. My setup automatically updates the tagbrowser with information on newly added equipment, so I'll be fleshing out a gateway-script that browses the parent folder of these tags and updates a dataset that contains all locationdata.
With this dataset I wanted to dynamically add in the appropriate amount of Embedded Views, in which I have a simple marker + ID to identify the equipment. Dynamically adding elements is off the table, so I'm thinking about preparing 150 or so elements and set them all to invisible. To circumvent having to set up bindings for all of those individually, I'll have to setup a script that writes properties to the appropriate element based on the index of the entry in the dataset. So far so good.
My main apprehensions here are;
- how am I going to set this up in a way not every single element is going to receive an "updated position" when only one has changed? The GPS transponder will communicate a new position every 2 or 20 minutes, depending on whether or not it's in transit. I was thinking about working with timestamps in the dataset, but I'd have to copy the timestamps to a local dataset to be able to track if they've changed. At that point, I'm wondering if sending "new" x-y coordinates to all elements is any worse than checking every row of the dataset against the rows I've stored to see if the timestamp changed?
- what should I expect in terms of performance when building a view with 100+ embedded views? Is it recommended in regards to performance to instead use a different element like an icon, or get creative with just a label?
Kind Regards!