Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
IainMacnab
Regular 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
KHorseman
Community Champion
Community Champion

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

v-chuncz-msft
Community Support
Community Support

@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.

View solution in original post

8 REPLIES 8
ryanbaumann
Frequent Visitor

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

 

 

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

 

Thanks for your reply

ryanbaumann
Frequent Visitor

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

v-chuncz-msft
Community Support
Community Support

@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.

Thanks @v-chuncz-msft,

 

I will follow the tutorials which are much appreciated!!

KHorseman
Community Champion
Community Champion

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

This is an old thread, but in case someone comes across it, the Route Map custom plugin does plot routes on maps https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380985?tab=Overview

Many thanks,

 

Never used R before but it will be an interesting exercise

 

Thanks for taking the time to reply!!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.