# Data Template on kymera map

**URL:** <https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727>\
**Category:** Ignition\
**Created:** [March 30, 2019, 4:58am UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727 "2019-03-30T04:58:25Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [March 30, 2019, 4:58am UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/1 "2019-03-30T04:58:25Z")

</div>

Hi

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’}  
which:  
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.

---

<div class="post-metadata">

**Author:** ![andytimc](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andytimc/32/11938_2.png) [@andytimc](https://forum.inductiveautomation.com/u/andytimc)\
**Post date:** [July 1, 2019, 8:02pm UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/2 "2019-07-01T20:02:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [July 2, 2019, 4:24am UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/3 "2019-07-02T04:24:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [July 2, 2019, 5:40am UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/4 "2019-07-02T05:40:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andytimc](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andytimc/32/11938_2.png) [@andytimc](https://forum.inductiveautomation.com/u/andytimc)\
**Post date:** [July 2, 2019, 12:22pm UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/5 "2019-07-02T12:22:59Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/99d084f8249e3707ee9f7a43c41066238376b8f6.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 2, 2019, 12:27pm UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/6 "2019-07-02T12:27:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andytimc](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andytimc/32/11938_2.png) [@andytimc](https://forum.inductiveautomation.com/u/andytimc)\
**Post date:** [July 2, 2019, 12:31pm UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/7 "2019-07-02T12:31:18Z")

</div>

Thanks Pat,

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

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [July 3, 2019, 4:19am UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/8 "2019-07-03T04:19:27Z")

</div>

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

```python
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.

---

<div class="post-metadata">

**Author:** ![andytimc](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andytimc/32/11938_2.png) [@andytimc](https://forum.inductiveautomation.com/u/andytimc)\
**Post date:** [July 8, 2019, 8:06pm UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/9 "2019-07-08T20:06:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [July 9, 2019, 1:52am UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/10 "2019-07-09T01:52:41Z")

</div>

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.

Kyle

---

<div class="post-metadata">

**Author:** ![andytimc](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andytimc/32/11938_2.png) [@andytimc](https://forum.inductiveautomation.com/u/andytimc)\
**Post date:** [July 9, 2019, 12:10pm UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/11 "2019-07-09T12:10:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andytimc](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andytimc/32/11938_2.png) [@andytimc](https://forum.inductiveautomation.com/u/andytimc)\
**Post date:** [July 9, 2019, 12:43pm UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/12 "2019-07-09T12:43:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [July 9, 2019, 3:52pm UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/13 "2019-07-09T15:52:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andytimc](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andytimc/32/11938_2.png) [@andytimc](https://forum.inductiveautomation.com/u/andytimc)\
**Post date:** [July 10, 2019, 11:40am UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/14 "2019-07-10T11:40:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [July 10, 2019, 4:08pm UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/15 "2019-07-10T16:08:20Z")

</div>

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

Kyle

---

<div class="post-metadata">

**Author:** ![andytimc](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andytimc/32/11938_2.png) [@andytimc](https://forum.inductiveautomation.com/u/andytimc)\
**Post date:** [July 10, 2019, 4:12pm UTC](https://forum.inductiveautomation.com/t/data-template-on-kymera-map/23727/16 "2019-07-10T16:12:15Z")

</div>

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.
