cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IainMacnab Frequent Visitor
Frequent Visitor

Plot a line on a Map

Hi All,

 

I have a request for the ability to show routes on a map in a Power BI report.  The user has a list of routes with origins and destinations.  They would like an arc drawn between each of the origin and destination points and for these to be selectable in order to filter data in the dashboard.

 

I cannot find any obvious way to do this in the existing map controls.  Does anyone know of a custom visual that would allow this.  it seems like a useful addition for the many companies that deal with route related information

 

Thanks in advance

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Plot a line on a Map

You can't do this in any of the existing map visuals but there is a possible R script solution here.

Community Support Team
Community Support Team

Re: Plot a line on a Map

@IainMacnab,

 

You may follow the tutorial to create the custom visual. The developer tools can be used to build R Powered Custom Visual as well.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
7 REPLIES 7
Super User
Super User

Re: Plot a line on a Map

You can't do this in any of the existing map visuals but there is a possible R script solution here.

Community Support Team
Community Support Team

Re: Plot a line on a Map

@IainMacnab,

 

You may follow the tutorial to create the custom visual. The developer tools can be used to build R Powered Custom Visual as well.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
IainMacnab Frequent Visitor
Frequent Visitor

Re: Plot a line on a Map

Many thanks,

 

Never used R before but it will be an interesting exercise

 

Thanks for taking the time to reply!!!

IainMacnab Frequent Visitor
Frequent Visitor

Re: Plot a line on a Map

Thanks @v-chuncz-msft,

 

I will follow the tutorials which are much appreciated!!

ryanbaumann Frequent Visitor
Frequent Visitor

iRe: Plot a line on a Map

This seems like a great fit for a custom visual with Mapbox GL. 

 

Here's an example of converting 1000 point pairs to arcs with a few lines of javascript for a custom visual - https://bl.ocks.org/ryanbaumann/7a5480c20f2de3aba91bb19435403b3b

ryanbaumann Frequent Visitor
Frequent Visitor

Re: Plot a line on a Map

This seems like a great fit for Mapbox GL tools as a custom viz.  A few lines of javascript can easily transform point parts to arcs, and linestrings are natively rendered in Mapbox tools even for really large numbers of lines.  - https://bl.ocks.org/ryanbaumann/7a5480c20f2de3aba91bb19435403b3b

 

 

IainMacnab Frequent Visitor
Frequent Visitor

Re: Plot a line on a Map

That looks like a lovely render.  I will give that a try when I get a minute

 

Thanks for your reply