Edit mode in Google Earth plugin

477 views
Skip to first unread message

leidil

unread,
Jul 30, 2008, 6:08:18 PM7/30/08
to KML Developer Support - Google Earth Browser Plugin
Is there an API to change the Google Earth plugin into an edit mode?
I want the user to be able to modify (drag and drop) the polygon or
placemark.

fraser

unread,
Jul 30, 2008, 6:20:07 PM7/30/08
to KML Developer Support - Google Earth Browser Plugin
Hi Leidil,

There isn't an "edit mode" in the API but you can implement all the
functionality you require with it
Check this link for a good example of what can be done...

(i.e. Use draggable pushpins to rotate, re-size and locate a single,
regular polygon or circle anywhere on the globe)
http://www.barnabu.co.uk/geapi/polyplot

Regards,

Fraser.

jpwade_bsu

unread,
Aug 2, 2008, 10:49:53 PM8/2/08
to KML Developer Support - Google Earth Browser Plugin
Hello Fraser,

Yes! James Stafford @ barnabu.co.uk has created some excellent work
for GE and his polyplot script for the API has potential for spatial
analysis functions. Something I have not seen anyone accomplish yet in
GE or its API.

I have toy'd around with it a bit and can see the ease of creating
multiple pgon's or lines and displaying the difference in their
attributes. Hopefully James will eventually tweak it for that purpose
if he feels the desire to do so.

jpwade
www.czmartin.com/jpw


On Jul 30, 3:20 pm, fraser wrote:
> Hi Leidil,
>
> There isn't an "edit mode" in the API but you can implement all the
> functionality you require with it
> Check this link for a good example of what can be done...
>
> (i.e. Use draggable pushpins to rotate, re-size and locate a single,
> regular polygon or circle anywhere on the globe)http://www.barnabu.co.uk/geapi/polyplot
>
> Regards,
>
> Fraser.
>
> On Jul 30, 11:08 pm, leidil wrote:
>
>
>
> > Is there an API to change the Google Earth plugin into an edit mode?
> > I want the user to be able to modify (drag and drop) the polygon or
> > placemark.- Hide quoted text -
>
> - Show quoted text -

leidil

unread,
Aug 5, 2008, 10:23:13 AM8/5/08
to KML Developer Support - Google Earth Browser Plugin
Thanks Fraser,
The example gave me a good start on what I am trying to do.
Do know if there any example on setting the placemark absolute from
the ground (200 ft). I tried the api but got no luck so far.

Leidil

On Jul 30, 6:20 pm, fraser wrote:
> Hi Leidil,
>
> There isn't an "edit mode" in the API but you can implement all the
> functionality you require with it
> Check this link for a good example of what can be done...
>
> (i.e. Use draggable pushpins to rotate, re-size and locate a single,
> regular polygon or circle anywhere on the globe)http://www.barnabu.co.uk/geapi/polyplot

fraser

unread,
Aug 5, 2008, 1:22:05 PM8/5/08
to KML Developer Support - Google Earth Browser Plugin
HI Leidil,

No problem, glad to help....

I couldn't see and example myself but you can certainly set the
placemarks point "altitudeMode" and "altitude" using either kml or
the plug-in.

Check the entry for <point> in the KML API:
http://code.google.com/apis/kml/documentation/kmlreference.html#point

And the entry for KmlPoint in the plug-in API
http://code.google.com/apis/earth/documentation/reference/interface_kml_point.html

For example....

using the plug-in:
--------------------------------------------------
// Create placemark
var placemark = ge.createPlacemark('');
placemark.setName("Absoulte Altitude Example");
ge.getFeatures().appendChild(placemark);
// Create point
var point = ge.createPoint('');
point.set(your_latitude, your_longitude, 200, ALTITUDE_ABSOLUTE,
false, false)
placemark.setGeometry(point);
--------------------------------------------------

using KML...
--------------------------------------------------
<Placemark>
<name>My Placemark</name>
<description>Set at 200ft above the earth</description>
<Point>
<coordinates>your_latitude,your_longitude,200</coordinates>
<altitudeMode>absolute</altitudeMode
</Point>
</Placemark>
--------------------------------------------------

Hope that helps.

Regards,

Fraser.

leidil

unread,
Aug 6, 2008, 3:35:13 PM8/6/08
to KML Developer Support - Google Earth Browser Plugin
That works!
Thank for all the help.

leidil

On Aug 5, 1:22 pm, fraser wrote:
> HI Leidil,
>
> No problem, glad to help....
>
> I couldn't see and example myself but you can certainly set the
> placemarks point "altitudeMode" and "altitude" using either kml or
> the plug-in.
>
> Check the entry for <point> in the KML API:http://code.google.com/apis/kml/documentation/kmlreference.html#point
>
> And the entry for KmlPoint in the plug-in APIhttp://code.google.com/apis/earth/documentation/reference/interface_k...
Reply all
Reply to author
Forward
0 new messages