• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Google Earth Blog

The amazing things about Google Earth

  • Home
  • About
  • Basics
  • Links
  • Tips
  • 3D Models
  • Sightseeing
  • Videos

Drawing arcs with JavaScript

October 26, 2015

A couple of weeks ago Google updated the Voyager layer, adding a new sub-layer called ‘Animal View’. The layer includes some nice arcs between placemarks. However, there is no automatic way to create these arcs with Google Earth or in KML. We do not know how Google created them, but when we have seen it done in the past (such as in this KML) it was done programmatically.

We thought a utility to create these arcs might be useful.

In order to draw an arc we first needed to work out the location of points along a great circle between two points. We did this with assistance from this website. We have used a simple sine wave and by default make the maximum altitude of the centre of the arc one fourth of the distance between the two points. There is also the option to set the maximum altitude of the arc. We have used altitudes relative to the ground, which has the advantage of making sure the end points start from the ground, but as can be seen in the screen shot above, if there is a significant dip in the ground altitude it is mirrored in the arc as well (notice dips where the arc crosses the river). This effect is not noticeable for larger arcs.

You can include multiple features, such as Placemarks, Polygons or Paths. All Placemarks will be put together and arcs drawn between pairs of consecutive points. Polygons and Paths will have an arc between each consecutive point.

If you don’t like the styling, you can adjust that later in Google Earth or in the KML.

No of segments to divide into:

Altitude method:

Maximum altitude: (metres relative to ground)

Extrude: (shades the area below the arc)

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.

  • More Posts(754)

Filed Under: Site News Tagged With: arcs, KML javascript utilities

Reader Interactions






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. Todd says

    June 28, 2016 at 3:55 pm

    Hi Timothy, How does the spreadsheet need to be formatted before upload to create the arcs? Thanks Todd

  2. Todd says

    June 28, 2016 at 4:14 pm

    Wow. This is great. I figured it out. Thanks. Todd



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.

Primary Sidebar

RSS
Follow by Email
Facebook
Twitter




Categories

  • 3D Models (792)
  • Applications (708)
  • Business (288)
  • Environment (353)
  • Flying (208)
  • GE Plugin (282)
  • Google Earth News (1,764)
  • Google Earth Tips (592)
  • GPS (136)
  • Navigation (227)
  • Network Links (214)
  • Sailing (121)
  • Science (499)
  • Sightseeing (1,903)
  • Site News (587)
  • Sky (67)
  • Sports (154)
  • Street View (50)
  • Tours (117)
  • Video (421)
  • Weather (180)

Get new posts by email

Get new posts by email:

Google Earth Satellites

Copyright 2005-© 2023 Frank Taylor. All Rights Reserved.

This blog and its author are not an official source of information from Google that produces and owns Google Earth Google and Google Earth are trademarks of Google Inc.. All image screenshots from Google Earth are Copyright Google. All other trademarks appearing here are the trademarks of their respective owners.