Search code examples
javascriptgoogle-earth-plugin

Javascript Google Earth path editor


What I am trying to do is create a embedded javascript application where the google earth plugin is embedded in a webpage with various paths drawn on. Here is an example of what I am trying to achieve.

Example of what I want to achieve

The catch is that the lines need to be editable, with each joint having a handle where the user can click and drag. I have looked high and low on Googles api documentation and I cannot find anything even close to this. If anyone can point me in the right direction it would be much appreciated.


Solution

  • You want each 'joint' to be a dragable placemark so that when you drag it the line geometry is updated.

    For reference check out the Google Earth API Samples - Draggable Placemark: http://earth-api-samples.googlecode.com/svn/trunk/examples/placemark-dragdrop.html

    And possibly James Stafford's polyplot: http://www.barnabu.co.uk/geapi/polyplot/

    Together they should help you achieve what you want.