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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
paulfromhouston
Frequent Visitor

make separate straight lines on map

I want to make multiple straight lines on map, each line has start point (lat and long) and end point (lat and long), I want to know the distance of each line between the start and end points. 

My data table is similar like below:

AA1, start_lat, start_long, end_lat, end_long;

BB1, start_lat, start_long, end_lat, end_long;

CC1, start_lat, start_long, end_lat, end_long;

...

Any suggestion?

Thank you,

Paul

2 ACCEPTED SOLUTIONS
Vijay_Chethan
Super User
Super User

Hello paulfromhouston,
in power bi you could achieve it using Azure map visual
you need to make sure that your tenent admin has given acccess 
if yes then , u need to format your data in following type:
AA1,start, lat, long;
AA1,end, lat, long;
then you can lat and long columns for visual and then u can add AA1 column or name column for "path id" for visual


if this helps, please mark as solution

View solution in original post

Thank you, will test it later today and mark this as solution if it works for me. 🙂

View solution in original post

4 REPLIES 4
Vijay_Chethan
Super User
Super User

Hello paulfromhouston,
in power bi you could achieve it using Azure map visual
you need to make sure that your tenent admin has given acccess 
if yes then , u need to format your data in following type:
AA1,start, lat, long;
AA1,end, lat, long;
then you can lat and long columns for visual and then u can add AA1 column or name column for "path id" for visual


if this helps, please mark as solution

Thank you, will test it later today and mark this as solution if it works for me. 🙂

Akash_Varuna
Super User
Super User

Hi @paulfromhouston  For this use Pandas to load the data table with start and end coordinates, calculate distances using Geopy, and use Folium to plot the lines. For each row, use PolyLine in Folium to draw a straight line between the start and end points. Skip adding markers; focus only on drawing lines to represent connections. Save the map as an HTML file to view the lines and distances visually.

Do you have an example that I can follow? Thank you!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.