# Popping message for world map line plot

**URL:** https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868
**Category:** Dashboard
**Created:** [28 August 2019 19:01 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868 "2019-08-28T19:01:45Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Chinmay](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Chinmay](https://discourse.nodered.org/u/Chinmay)
#### Post date: [28 August 2019 19:01 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/1 "2019-08-28T19:01:45Z")

</div>

Hello, I was creating a world map in a dashboard showing the flight path of a bird. I was able to plot it by giving series of latitudes and longitudes in “line“ of msg.payload. The flight path is visible well . But now when I click on the different flight paths ,different messages should be popped in dashboard. How can this be achieved?Thanks in advance

---

<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: [28 August 2019 19:22 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/2 "2019-08-28T19:22:16Z")

</div>

I’m not sure 🙂 how are you drawing the line ? Can you share a small example of a path/ flow ?

---

<div class="post-metadata">

### Author: ![Chinmay](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Chinmay](https://discourse.nodered.org/u/Chinmay)
#### Post date: [28 August 2019 19:25 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/3 "2019-08-28T19:25:18Z")

</div>

Thank you for the reply.

 ![13](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0db67f4167a2bfe7c9e9a45a8a83fa9ab9eb6583.png)

Inside function this is the code:  
// create random position  
msg.payload = {"name": "zone1", "line": [[13.066822803738315,33.112371733644835],

[14.101159983568067,32.98870006572771],  
[15.325126915887838,32.834869070093454],  
[16.328367018867926,32.55118656603773],  
[16.927085568075118,32.0522412206573],  
[18.19762972897196,31.71202828504672],  
[20.171845327188933,31.658545078341017]]  
}

msg.payload.popup="lhfd"  
return msg;

and dashboard looks like this:

 ![42](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/67f4790d71dfbde3f20464127f965b4ecd22a708.jpeg)

---

<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: [28 August 2019 19:53 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/4 "2019-08-28T19:53:49Z")

</div>

adding `clickable:true` will give you this when clicked.

```auto
[20.171845327188933,31.658545078341017]],
clickable:true
}

```

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f3a8ac16d9e2977d761439e595bbb65facca4df9.png)

---

<div class="post-metadata">

### Author: ![Chinmay](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Chinmay](https://discourse.nodered.org/u/Chinmay)
#### Post date: [28 August 2019 20:02 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/5 "2019-08-28T20:02:33Z")

</div>

That is awesome. Thank you, was a perfect solution

---

<div class="post-metadata">

### Author: ![Chinmay](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Chinmay](https://discourse.nodered.org/u/Chinmay)
#### Post date: [28 August 2019 20:06 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/6 "2019-08-28T20:06:32Z")

</div>

Can I add a question to this?What if I want to add different paths and different messages for each?How can this be done

---

<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: [28 August 2019 20:10 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/7 "2019-08-28T20:10:56Z")

</div>

just inject other lines each with their own popup.

---

<div class="post-metadata">

### Author: ![Chinmay](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Chinmay](https://discourse.nodered.org/u/Chinmay)
#### Post date: [28 August 2019 20:13 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/8 "2019-08-28T20:13:30Z")

</div>

Thank you,I am completely new to this ..Probably a piece of code would be greatly helpful.

---

<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: [28 August 2019 20:26 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/9 "2019-08-28T20:26:03Z")

</div>

create another function with zone2 etc etc... and inject that.

---

<div class="post-metadata">

### Author: ![Chinmay](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Chinmay](https://discourse.nodered.org/u/Chinmay)
#### Post date: [28 August 2019 20:31 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/10 "2019-08-28T20:31:57Z")

</div>

Thank you so much, it worked like a charm. But, is this the efficient way to do?Because what if I want to plot 10000 of paths? Creating 10000 functions would be inefficient right?

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [28 August 2019 20:35 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/11 "2019-08-28T20:35:25Z")

</div>

if you need to plot 10000 paths you probably aren’t using the right tool

---

<div class="post-metadata">

### Author: ![Chinmay](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Chinmay](https://discourse.nodered.org/u/Chinmay)
#### Post date: [28 August 2019 20:37 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/12 "2019-08-28T20:37:24Z")

</div>

Ok, this was helpful to know.

---

<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: [28 August 2019 20:47 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/13 "2019-08-28T20:47:32Z")

</div>

more usually you would use a single function that you passed data into - but depends where the data is coming from...

---

<div class="post-metadata">

### Author: ![Chinmay](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@Chinmay](https://discourse.nodered.org/u/Chinmay)
#### Post date: [29 August 2019 07:01 UTC](https://discourse.nodered.org/t/popping-message-for-world-map-line-plot/14868/14 "2019-08-29T07:01:03Z")

</div>

Thank you for your kind replies
