(semi)-dynamic generation of perspective components

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 :slight_smile:

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!

So you want markers on a map to be dynamically generated ?

If that's it, it's completely possible.
A simple binding will do that for you.

If not, what is it you can't generate dynamically ?

I'd love to hear a solution with a single binding!

I have a dataset with x amount of rows and 4 columns; name, equipment-type, latitude, longitude.

For every row in the dataset, I want to generate a marker on the map. The rowcount can (and will) change during production. So I can't make 15 markers and bind them to individual rows of the dataset, because I might run out or multiple markers will end up without a valid binding.

Take a look at this project Ignition Exchange | Inductive Automation and the recorded show https://youtu.be/Apl1_5Z18u0?si=vKUZ-UTYKjoyWcOs

This project uses the Google Maps component, which requires a developer API key to use fully. I have had success with using the normal map component in the same way. You can add markers either with a binding on the entire structure for markers in the component or you can directly create them with scripting as needed (such as on a message handler event).