Polylines from JSON string?

Is it possible to draw polylines with points from a JSON string like in Android Classic?

If so, how?

Thanks for any help!

Yes. Will it work?

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

Thanks, I saw that block, but the text block doesn’t connect to that.

Why do you need to connect a text block to this block? A list with coordinates or a variable with the desired data type can be connected to this block.

There are about 350 points in the polyline. I don’t want to enter them one by one, but in a Json string.

From the text string, you can create a list of data in the required format.

https://docs.thunkable.com/thunkable-cross-platform/create/components/location/map#add-polyline

1 Like

I think I get it, thanks. Will report back here with the result.

Now I feel like an idiot. :crazy_face:
There seems to be no ‘create list with’ block… There is only the create list with repeated items block.

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

2 Likes

That’s fantastic. Thanks for your help!

OT: it’s strange how the json format differs. In Android Classic only [[mydata],[otherdata]] will work, not [{mydata},{otherdata}]

Yes, in Thunkable X uses an array of objects, and Thunkable Classic uses a multi-dimensional array.

1 Like