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
I’m not sure how are you drawing the line ? Can you share a small example of a path/ flow ?
Thank you for the reply.
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:
adding clickable:true
will give you this when clicked.
[20.171845327188933,31.658545078341017]],
clickable:true
}
That is awesome. Thank you, was a perfect solution
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
just inject other lines each with their own popup.
Thank you,I am completely new to this ..Probably a piece of code would be greatly helpful.
create another function with zone2 etc etc... and inject that.
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?
if you need to plot 10000 paths you probably aren’t using the right tool
Ok, this was helpful to know.
more usually you would use a single function that you passed data into - but depends where the data is coming from...
Thank you for your kind replies