# Internal error when adding polyline from variables

**URL:** <https://community.thunkable.com/t/internal-error-when-adding-polyline-from-variables/54283>\
**Category:** Questions about Thunkable X\
**Created:** [October 30, 2018, 7:46am UTC](https://community.thunkable.com/t/internal-error-when-adding-polyline-from-variables/54283 "2018-10-30T07:46:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rescondio](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@rescondio](https://community.thunkable.com/u/rescondio)\
**Post date:** [October 30, 2018, 7:46am UTC](https://community.thunkable.com/t/internal-error-when-adding-polyline-from-variables/54283/1 "2018-10-30T07:46:26Z")

</div>

Hello,

I am trying to create a route in a map in Thunkable X by gathering coordinates every N seconds, and then painting a polyline on the map.

However, I’ve found that when I use variables inside the “addPolyline” method, I always get an internal error. Please see screenshot below:

 ![Polyline_error](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/0/009839fec10dcd3826a82e2de88339646e86183c.png)

I can create a list from variables, but the error happen when assigining it to addPolyline.

Things I’ve tried before posting:

1. The one on the screenshot.
2. Creating a local variable with the fields “latitude” and “longitude” and assigning to addPolyline directly.
3. Serializing and unserializing this last local variable.

None of these 3 approaches worked.

Is it possible to create a polyline from variables? if so, is there any example available to check what am I doing wrong?

Thank you !

---

<div class="post-metadata">

**Author:** ![Dennis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/dennis/32/30148_2.png) [@Dennis](https://community.thunkable.com/u/Dennis)\
**Post date:** [October 30, 2018, 9:12am UTC](https://community.thunkable.com/t/internal-error-when-adding-polyline-from-variables/54283/2 "2018-10-30T09:12:27Z")

</div>

I have the same issue with new variables (since the update). In my old projects it still works.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [October 30, 2018, 6:56pm UTC](https://community.thunkable.com/t/internal-error-when-adding-polyline-from-variables/54283/3 "2018-10-30T18:56:59Z")

</div>

Use old type variables that can be obtained from the function block to which the parameters are added.

> [@Polylines from JSON string?](http://community.thunkable.com/t/polylines-from-json-string/53936/9):
>
> To improve your mood, a simple example with JSON data for a polyline. sunglasses I also show the magic of turning a string into a numeric type. [%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5]

---

<div class="post-metadata">

**Author:** ![paulmw](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@paulmw](https://community.thunkable.com/u/paulmw)\
**Post date:** [October 30, 2018, 7:02pm UTC](https://community.thunkable.com/t/internal-error-when-adding-polyline-from-variables/54283/4 "2018-10-30T19:02:03Z")

</div>

Thanks for reporting this bug. It will be fixed in the next release (and thanks for the screenshot, it helped to track down the problem quickly).

---

<div class="post-metadata">

**Author:** ![fletch4duv7ci](https://avatars.discourse-cdn.com/v4/letter/f/bcef8e/32.png) [@fletch4duv7ci](https://community.thunkable.com/u/fletch4duv7ci)\
**Post date:** [January 26, 2021, 6:51pm UTC](https://community.thunkable.com/t/internal-error-when-adding-polyline-from-variables/54283/5 "2021-01-26T18:51:26Z")

</div>

I created new variables and it worked —

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/9/f9982c901573b1c5e264486c54723267d58bbacd.png)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:54am UTC](https://community.thunkable.com/t/internal-error-when-adding-polyline-from-variables/54283/6 "2024-11-08T11:54:54Z")

</div>


