Geodesic polyline

Api v2.84 gave us option 'geodesic' for GPolylines.

Geodesic means 'along great circle' which is the shortest way between two locations on earth. Shortest paths are rarely straight lines on mercator projected maps.

You don't have to code any maths. Just put {geodesic:true} to GPolyline options

The number of segments depends on zoom value.

NOTE: The option does not alter the return value of .getVertexCount().

Try dragging the markers or search locations:



Right button of mouse is now available too. GEvent 'singlerightclick' was just added to api

Try rightclicking if you need control buttons on this page.

Experiment index