Draw a curve (bezier curve) between two lat long points on google maps android

前端 未结 1 1217
情话喂你
情话喂你 2021-01-14 16:59

I want to draw a curve (Beizer curve) between two lat-long points. Currently i am referring this post (code is in javascript).

Code to get curve points usin

相关标签:
1条回答
  • 2021-01-14 17:27

    This answer is somewhat specative, but I suggest that nothing you are seeing is actually wrong or even unexpected. As you know, the Earth is round, but Google Maps (and computer screens) are inherently flat and two dimensional. The way we begin creating a flat 2D map of the Earth is by carving up a globe like this:

    Things get somewhat warped and skewed in the process of creating the 2D map of the world to which we are all accustomed to see. I don't have the maths to back it up, but it seems obvious that 3D curves connecting two cities across most of the globe would also get warped and skewed after projecting them onto a 2D map. And I would expect the distortions to get more pronounced the longer the curves are.

    This also would explain why the curve from Mumbai to Chennai looks normal to you. It is over a relatively short distance, where distortions due to the curvature of the Earth are minimal.

    0 讨论(0)
提交回复
热议问题