# World Map - Unit of speed

**URL:** <https://discourse.nodered.org/t/world-map-unit-of-speed/46220>\
**Category:** General\
**Created:** [25 May 2021 13:57 UTC](https://discourse.nodered.org/t/world-map-unit-of-speed/46220 "2021-05-25T13:57:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nice\_to\_have](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nice\_to\_have](https://discourse.nodered.org/u/Nice_to_have)\
**Post date:** [25 May 2021 13:57 UTC](https://discourse.nodered.org/t/world-map-unit-of-speed/46220/1 "2021-05-25T13:57:44Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/3/a34bdb327508c6dadbc76f2e290e47a366977d1a.png)

---

<div class="post-metadata">

**Author:** ![tve](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tve/32/59475_2.png) [@tve](https://discourse.nodered.org/u/tve)\
**Post date:** [26 May 2021 00:44 UTC](https://discourse.nodered.org/t/world-map-unit-of-speed/46220/2 "2021-05-26T00:44:18Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![Nice\_to\_have](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nice\_to\_have](https://discourse.nodered.org/u/Nice_to_have)\
**Post date:** [26 May 2021 04:27 UTC](https://discourse.nodered.org/t/world-map-unit-of-speed/46220/3 "2021-05-26T04:27:05Z")

</div>

> [@tve](#):
>
> x.speed = "" + x.speed + " kn"

Both show NAN as a result

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/d/3d0cdde10bf974ea99d8922b07ffad0964173cbe.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 May 2021 08:25 UTC](https://discourse.nodered.org/t/world-map-unit-of-speed/46220/4 "2021-05-26T08:25:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 May 2021 12:36 UTC](https://discourse.nodered.org/t/world-map-unit-of-speed/46220/5 "2021-05-26T12:36:31Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Nice\_to\_have](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nice\_to\_have](https://discourse.nodered.org/u/Nice_to_have)\
**Post date:** [26 May 2021 13:21 UTC](https://discourse.nodered.org/t/world-map-unit-of-speed/46220/6 "2021-05-26T13:21:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 May 2021 13:23 UTC](https://discourse.nodered.org/t/world-map-unit-of-speed/46220/7 "2021-05-26T13:23:59Z")

</div>

I see version 2.15.0 - try clearing out your browser cache

---

<div class="post-metadata">

**Author:** ![Nice\_to\_have](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nice\_to\_have](https://discourse.nodered.org/u/Nice_to_have)\
**Post date:** [26 May 2021 13:39 UTC](https://discourse.nodered.org/t/world-map-unit-of-speed/46220/8 "2021-05-26T13:39:19Z")

</div>

💪  
Yes, I see it now too.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 June 2021 13:40 UTC](https://discourse.nodered.org/t/world-map-unit-of-speed/46220/9 "2021-06-09T13:40:19Z")

</div>

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