terence55 / react-baidu-maps

React Components for Baidu Maps
24 stars 4 forks source link

Not creating shortest polyline between China and USA #18

Open cjadhav opened 3 years ago

cjadhav commented 3 years ago

Hi I guess this is NOT issue with the module, but definately a issue with Baidu Maps.

Ploting polyline from a city from west coast of USA (e.g. Los Angeles, USA) to East Coast of China (e.g Shanghai, China). It should show the polyline over Pacific Ocean but it shows in wrong direction. (shows over India, Africa and then USA.)

Expected (Google Map)

Gmap

Actual (Baidu Maps)

Bmap

Please help if we can handle this situations in Baidu Maps.

Thanks

terence55 commented 1 year ago

The PolylineOptions class has a property called geodesic, and when set to true, will display a polyline over the Pacific Ocean.

image image