Reply
Frequent Visitor
Posts: 4
Registered: ‎12-14-2016
Accepted Solution

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


Accepted Solutions
Super Contributor
Posts: 1,026
Registered: ‎12-29-2015

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.

View solution in original post

Super Contributor
Posts: 677
Registered: ‎07-09-2016

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.

View solution in original post


All Replies
Super Contributor
Posts: 1,026
Registered: ‎12-29-2015

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.

Super Contributor
Posts: 677
Registered: ‎07-09-2016

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.

Frequent Visitor
Posts: 4
Registered: ‎12-14-2016

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!!!

Frequent Visitor
Posts: 4
Registered: ‎12-14-2016

Re: Plot a line on a Map

Thanks @v-chuncz-msft,

 

I will follow the tutorials which are much appreciated!!

Frequent Visitor
Posts: 4
Registered: ‎03-19-2017

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

Frequent Visitor
Posts: 4
Registered: ‎03-19-2017

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

 

 

Frequent Visitor
Posts: 4
Registered: ‎12-14-2016

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