Polyline on map generated by coordinates from database

Hello everyone, I have a problem that I want to share with you. I want to display a series of aqueduct lines in the map component, for which I have point-to-point coordinates entered into a database. To extract them, load a query name with the data and then try to bind it using a Query binding followed by a script that assigns it to lat and lng objects. But although they seem to be loaded correctly, the designer tells me an error (layers.vector.polyline[0].points[1].lng: string found, number, null expected), which according to my understanding is due to the data type, and I still can’t solve this. I am interested to know if someone can think of a solution or a simpler way to perform the same data acquisition process.


Preformatted text

Please post code, not pictures of code. Tip: use the </> code formatting button to preserve code indentation and apply syntax highlighting. It’s essential for Python and makes any code much easier to read. There’s an edit button (pencil icon) below your post so you can fix it.

That path doesn't line up with the section of the property editor you've shown in the screenshot; what do the values look like in the points array?

Also, it's probably not relevant to your issue, but I'm pretty sure your transform script could be reduced to something like this:

pds = system.dataset.toPyDataSet(value)

return list(dict(row) for row in pds)

Or as a comprehension:

pds = system.dataset.toPyDataSet(value)

return [
	{
		"lat": lat,
		"lng": lng
	} for lat, lng in pds
]

How are your long and lat values stored in the database?
If they are stored as strings, they will need converting to floats.