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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
lfuentealbab
Regular Visitor

Mapa Azure no une dos puntos

Buenos dias, favor ayuda con una situacion que sucedes con el mapa de Azure al trazar una linea entre dos puntos, ejemplo desde este a oeste realizando el seguimiento a un barco, en medio del pacifico esta linea en vez de unir segun la secuencia de orden de puntos esta va en direccion contraria y une estos dos puntos dando la vuelta al este ejemplo:

 

lfuentealbab_0-1753454243451.png

 

favor sus comentarios como puedor solucionar esto  Gracias

 

1 ACCEPTED SOLUTION
v-echaithra
Community Support
Community Support

Hi @lfuentealbab ,

You can try to troubleshoot by implementing a check in your code to automatically detect when a line crosses the 180° meridian. The logic is simple: if the absolute difference between two longitude values is greater than 180°, you’re likely crossing the Date Line. Once detected, you have two reliable options to correct the line rendering.
The first option is to adjust the longitude values to a 0° to 360° range. For example, if you have a point at -170°, convert it to 190° by adding 360. This makes the distance between 170° and 190° only 20°, which helps the map engine interpret the line correctly. However, this method only works if the map engine supports the 0–360 format.

The second and more robust solution is to split the line into two smaller segments using a GeoJSON MultiLineString object. Instead of drawing a direct line from 170° to -170°, you break it into two parts: one from 170° to 180°, and the other from -180° to -170°. This ensures that each line segment stays on its respective side of the Date Line, and the mapping engine can render the route accurately without drawing an unintended arc across the globe.

If you’re using the Azure Maps JavaScript SDK, you can pass this corrected GeoJSON directly to atlas.data.Feature and display it without issues. This approach gives you full control over how lines are rendered across the map and eliminates the visual bugs caused by crossing the 180° longitude line.

Hope this helps.
Warm Regards,
Chaithra E.

 

View solution in original post

7 REPLIES 7
v-echaithra
Community Support
Community Support

Hi @lfuentealbab ,

We would like to confirm if you've successfully resolved this issue or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.


Thank you for your patience and look forward to hearing from you.
Best Regards,
Chaithra E.

v-echaithra
Community Support
Community Support

Hi @lfuentealbab ,

We wanted to follow up to see if the issue you reported has been fully resolved. If you still have any concerns or need additional support, please don’t hesitate to let us know, we’re here to help.

We truly appreciate your patience and look forward to assisting you further if needed.

Warm regards,
Chaithra E.

v-echaithra
Community Support
Community Support

Hi @lfuentealbab ,

You can try to troubleshoot by implementing a check in your code to automatically detect when a line crosses the 180° meridian. The logic is simple: if the absolute difference between two longitude values is greater than 180°, you’re likely crossing the Date Line. Once detected, you have two reliable options to correct the line rendering.
The first option is to adjust the longitude values to a 0° to 360° range. For example, if you have a point at -170°, convert it to 190° by adding 360. This makes the distance between 170° and 190° only 20°, which helps the map engine interpret the line correctly. However, this method only works if the map engine supports the 0–360 format.

The second and more robust solution is to split the line into two smaller segments using a GeoJSON MultiLineString object. Instead of drawing a direct line from 170° to -170°, you break it into two parts: one from 170° to 180°, and the other from -180° to -170°. This ensures that each line segment stays on its respective side of the Date Line, and the mapping engine can render the route accurately without drawing an unintended arc across the globe.

If you’re using the Azure Maps JavaScript SDK, you can pass this corrected GeoJSON directly to atlas.data.Feature and display it without issues. This approach gives you full control over how lines are rendered across the map and eliminates the visual bugs caused by crossing the 180° longitude line.

Hope this helps.
Warm Regards,
Chaithra E.

 

v-echaithra
Community Support
Community Support

Hi @lfuentealbab ,

We would like to confirm if you've successfully resolved this issue or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.

Thank you for your patience and look forward to hearing from you.
Best Regards,
Chaithra E.

Buenos dias Chaithra, lementablemente no he podido resolver este asunto aun, espero que alguien pueda encontrar alguna solucion a este problema

 

Gracias.,

Luis F.

v-echaithra
Community Support
Community Support

Hi @lfuentealbab ,

Thank you for reaching out to Microsoft Community.

Sometimes, when you draw a line between two places far apart on a map like Japan and California, it might stretch the long way around the globe instead of taking the shortest route. This usually happens because maps have trouble connecting points across the International Date line around 180° longitude, and the way map engines draw curved lines can accidentally wrap them the wrong way if special handling isn’t used.
To avoid issues when drawing lines across the map, you can split the path into smaller segments that stay on either side of the International Date Line, so the map doesn't mistakenly draw one long line wrapping around the whole globe.

Make sure all longitude values use the same range—preferably from 0° to 360° instead of -180° to 180°. For example, turn -170° into 190° by adding 360, so the map sees a 20° difference between two points instead of a long arc.

You can also try this workaround to prevent Azure Maps from incorrectly drawing a long straight line across the globe when a path crosses the International Date Line, you can manually split the route into two smaller segments using a GeoJSON MultiLineString. For example, instead of connecting coordinates from 170° to -170° directly, break them into two parts—one from 170° to 180°, and the other from -180° to -170°. This technique allows each segment to remain on its own side of the Date Line, ensuring the map renders the route accurately without wrapping it around the world.

{
"type": "Feature",
"geometry": {
"type": "MultiLineString",
"coordinates": [
[
[170, 10],
[180, 10]
], [
[-180, 10],
[-170, 10]
]]}}


Hope this helps,
Best Regards,
Chaithra E.

lbendlin
Super User
Super User

Wow, this is a cool issue! Looks like the visual is confused by the international date line!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.