World Map - Unit of speed

First of all, many thanks for he who made the world map node.
It's awesome.

I only have one question;
I am showing speed in Knots in the popup.
But i'd like the viewer to see it is kn. But when I use x.speed = x.speed + " kn" the result is NAN.
Which I think makes sense, as it looks for a number in x.speed.
I also cant change x.speed to for example x.knots, because then the vector doesn't show.

Any ideas on how to inform the viewer it's in Knots without a postit?

image

you might want to try x.speed = "" + x.speed + " kn" or

x.speed = `${x.speed} kn`

Both show NAN as a result

image

yes - currently we don't specify (but assume m/s for calculations) - so need to think about it.
Probably safest would be to add another property like speedUnit to the payload.

OK - version 2.15.0 will now accept strings - so "10 kts" or "10 knots" should work - and draw the leader line of the correct length (for where it would be in one minutes time at current course and speed)

I can't see version 2.15.0 just yet, but thanks for the solution and the work you put into the node.

I see version 2.15.0 - try clearing out your browser cache

:muscle:
Yes, I see it now too.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.