Data Template on kymera map


I create some templates that uses UDT as parameter and want to show them on kymera Map.
The problem is passing UDT tag to ‘data template’ in kymera is always get back error.
I try this in data templates\ template parameters: {Pump:PU01} or {Pump:‘PU01’}
pump: is the custom properties of template which accept UDT
PU01 is UDT instance of pump UDT
Does anyone know how to pass UDT to template data shape in kymera map?
There is no documentation for this.

Nader, I was looking at doing this same thing, did you ever get an answer for how to define the template parameters?

You pass in parameters as a json string. Any property in the root of the template can be passed in this way.

1 Like

Hi Andy
The simplest option is define a template that accept UDT. Pass UDT name as string to template. In template use indirect tag to access the member of UDT. Even in expression you can use tag() to access UDT member.
In data template in kymera map only pass UDT name. This is what I’ve done.

1 Like

Yes but I don’t know how to format the string in the template parameter. I have a template called WellData that has a string parameter called RootFolder that I need to set to something like ‘M2013_Pad34’, but I don’t know the correct format to put into the template parameters field to accomplish this.

Follow Kyle’s instructions. He’s the one to know–it’s his module. In other words, format the contents of your ‘Template Parameters’ column as dictionary converted to a json string. The same as what you do with the template canvas.

1 Like

Thanks Pat,

I just wasn’t getting understanding the json string format, but I got it now that you pointed it out. Thanks.

As an example, when you create your dataset, you can convert your dictionary to json as follows:

columnNames = ["Name","Latitude","Longitude","Template Path","Template Parameters"]
myRows = []
myRows.append(["W34", 40.795, -79.74, "WellData", system.util.jsonEncode({"RootFolder":"M2013_Pad34"})])
myRows.append(["W9", 40.832, -79.672, "WellData", system.util.jsonEncode({"RootFolder":"W9_FISHER107"})])

This should give you the results you want.

Also, Nader, do not use UDTs. They will negatively impact performance of your system if you bind to them. Pass in the highest level tag path you can, and use indirect bindings.


Thanks Kyle, thats working perfectly. On another note if I wanted to import a map that had my pipeline embedded on it could that be done or do you know the process of doing that. I’m using one of the open source maps listed in your documentation which is OK but someone requested the pipelines be shown in the map.

Hi Andy,
We have two options currently. Either you have a tile layer with just the pipelines drawn on a transparent tile, and you overlay that onto the base tiles, or we would use the dataShapes dataset to draw the pipelines at runtime, which makes it so you can interact with them.


1 Like

Thanks Kyle,

I don’t know much about tile layers but that is something I’d have to build and have hosted on a server for the module to access correct?

And as for the datashapes, i would just need to be very diligent to get all the proper coordinates for the lines and set them up in runtime. But it seems like something I should be able to do even if its a bit time consuming.

Oh also, there is no way to control line thickness correct?

Hello Andy,
You mentioned importing a pipeline map, what format is that in now? If it is already in tile form, you just need to serve up those tiles somehow, a HTTP server would suffice.

If it is in a CSV or similar, making the datashapes would be easiest.

Also, line thickness is not changeable right now, but we will add it to the dev cycle.

Right now my pipeline is in a collection of KMZ files which have been imported into a custom google map. I have no experience with custom tiles so I’m trying to learn whats possible.

OK, I would parse those files to generate the shapes data. We can help with that if you like.


I appreciate it, I’m going to talk to management and ask them if they want to go this route, I was setting up a test environment to show them whats possible now that I know I can add pipelines Is a big help.