Numbering the points on a Path or Polygon with KML

We have recently been spending some time improving our JavaScript for combining polygons. In order to debug it, we found it useful to number the points for display in Google Earth. We thought that others may find the feature useful, and just for fun, we added the option to display the distances along the segments. Distance is calculated using the Haversine formula, which, is the same method we believe the Google Maps API uses for calculating distance. We compared our measurements with Google Earth’s measuring tool and they did not match, so it appears Google Earth uses a different formula, which is probably more accurate. Google Earth’s measuring tool is also capable of optionally taking altitude into account.

[ Update: We have added the option to use the Haversine formula for the distance measurements as it is more accurate.]

Polygons or Paths:

Colour for point labels:

Label Size:

Include distances:

Distance formula:

Distance units:

Colour for distance labels:

About Timothy Whitehead

Timothy has been using Google Earth since 2004 when it was still called Keyhole before it was renamed Google Earth in 2005 and has been a huge fan ever since. He is a programmer working for Red Wing Aerobatx and lives in Cape Town, South Africa.






PLEASE NOTE: Google Earth Blog is no longer writing regular posts. As a result, we are not accepting new comments or questions about Google Earth. If you have a question, use the official Google Earth and Maps Forums or the Google Earth Community Forums.

Comments

  1. Thanks for all information



PLEASE NOTE: Google Earth Blog is no longer writing regular posts. As a result, we are not accepting new comments or questions about Google Earth. If you have a question, use the official Google Earth and Maps Forums or the Google Earth Community Forums.