From list of coordinates to marker + linestring on map

I apologize... I honestly don't know if this is the right section to ask for help.

Let me start by saying that I'm a super beginner...

I'm stuck on a problem:
From this series of blocks, I get a list of data containing "date, latitude and longitude"

With this data I generate a series of points on the map with this series of blocks.

Now I would like to join these points with LineString, but I can't make it digest the GPS coordinates I receive...

It would also be nice to color the starting marker red, then all yellow and the end green. (but I haven't worked on this yet)

Can you help me?

Welcome raffaele

You want to do something like this?

What you do depends on your existing code. What does your gps list look like? If your gps list is formed the right way, what you hope to do is easy.

Those two global variables name and name2 look very fishy.

Where do they get their values, and what is in them?

And what kind of list can be converted to CSV format and yield exactly 8 bytes of data in its 20th thru 27 bytes?

in practice yes...

My GPS list is made up as I see in your example. Except that in my list there is also date and time.

Global name is used to filter the names of the BT devices found

Global name2 I need to produce the points on the map
blocks (5)


I searched a lot here and there and reinterpreted what I found

To display a LineString you have to have the LineString.Points in exactly the form I posted. :cry:
Write some Blocks that a create a sublist of your present 'gps' list with just the coordinates as the simplest way to generate a LineString trak.

I'm stuck right here...

In practice I have:

[latitude1, longitude1]
[latitude2, longitude2]
etc..

While LineString wants them in sequence
[[latitude1, longitude1], [latitude2, longitude2], …]

I tried this, but I still can't extract the data I need.

I also thought about creating a CloudDB3, but I wanted to avoid putting too many DBs

Are you trying to collect a list of BLE device locations?

And what is the purpose of that global cont_Date?

At each scan it collected 3/4 of the same data.

By adding that variable I collect only one... at the next scan I set it back to 0

I honestly don't know if this is the right approach... but I solved it like this

yes...

Yes,

Your code to generate a coordinate List compatible with the LineString could look like:
LSpoints

BLAM!!! the door of the brain suddenly opens and the solution comes out!!

Thank you so much!!

Can you help me with the colors too? I read your post, but I can't find the set Marker.fillcolor component...

It was practically right under my nose... ok :slight_smile:

I'll ask you one last question about something else that I really couldn't find... (I swear I'll try not to bother you again!)

I can't "clean" the map. Now I have a lot of markers and lines, is there a way to create a "clean" button?

One possibility would be some code similar to this
image
to remove run time Markers and LineString tracks might work for you. You have to have made a List of your Markers first.

The code works for my app.

OK, thank you for everything! I'll try to adapt the code.