Removing lines between some GPS points

Is there a way to remove lines between a select GPS points on a GPS map? I would like to differentiate one group of GPS points from another group without having a line that connects them.

Hi @sw_jackrabbit,

There currently exists a checkbox within this node that can be toggled to remove lines between points:

Would this be sufficient?

If you’d like to group these points, you have options within this block configuration, but anything more custom would likely require the Custom HTML Block.

Thanks!
Julia

Unchecking the box would remove all lines, I would only like to remove specific lines.
For example I would like to draw lines between the first 10 points and then for the next 10 points but not have a line go from points 10 to point 11. This creates a separation between those two groups of GPS points. I hope that makes sense.
I don’t know what “cluster points into groupings” does, it’s always grayed out for me.

Thanks!

Hi @sw_jackrabbit,

Yes, you will need to use the Custom HTML Block in order to provide this level of customization. It is currently not possible to write conditionals for the displayed lines between points within the GPS History Block.

Please let me know if you have any further questions!

Thanks,
Julia

Thanks Julia,
Are there any examples I can use as a starting point or do I have to start with custom HTML documentation? I copied the code and my map is blank so I have long ways to go.

Hi @sw_jackrabbit,

There does not currently exist a specific example that highlights your request, but there is a walkthrough on how to get this map to display data. You can find the walkthrough here in the Forums. This walkthrough changes two lines of code to format for a hyphen, but you will not need to change these lines if you rename your query (for example, from gauge-0 to gps).

I will continue to look for further examples that may be beneficial and follow up should I locate any. Please let me know if you have any further questions!

Thanks so much,
Julia

I am using a data table and when I made changes i’m still showing blank map.
To eliminated data query errors I tried testing it by directly setting numbers for latlng variable and still get nothing. Shouldn’t lat/long numbers work ?

If I comment out “var gps” then I get an error even if I’m not using that variable:

Oops! Something went wrong.

This page didn’t load Google Maps correctly. See the JavaScript console for technical details.

Thanks

Hi @sw_jackrabbit,

Our expertise here at the Forums lies within the Losant Platform. Since the Custom HTML Block essentially supports any arbitrary code, it’s a very difficult one to help debug. But I can happily point you in the right direction to be successful with this block.

One pro tip, this block is prefilled when it is created to display the available DashboardBlock object. This object will show you the structure of your available data, and will even display your query results once a query is configured. I use this tip often when working with this block, it can be hard to keep track of the object structure. Also, keep in mind that your Dev Tools Console is also logging errors from this block, so be sure to check those out.

In addition, Google Maps provides a lot of great examples here. I’d recommend checking out those examples and even looking through Stack Overflow for helpful tips: https://stackoverflow.com/questions/tagged/google-maps-api-3.

Please let me know if you have any further questions!

Thanks,
Julia

Thank you for those tools.
I was able to display GPS points, it looked like I needed to enable GCP account with a credit card before I was allowed to use the google maps API key.

1 Like

You’re correct. Using Google Maps does require an API key and I believe Google now requires a credit card. The free tier is quite generous, however.

1 Like