How can I set a fixed time in google earth plugin

52 views
Skip to first unread message

Steven Ho

unread,
Feb 11, 2011, 7:59:30 AM2/11/11
to KML Developer Support - Google Earth Plug-in
Hi,

I want to show the 24 hours sky in some place in Google Earth plugin.
I don't want to use kml like placemark. I want to set the fixed time
directly by API. I wrote a program for testing. (http://gemvg.com/www/
setsuntime.htm) But, it didn't work.

Firebug show me the error is "ge.createTmeStamp is not a function".
Can someone give me a correction?

Ken

unread,
Feb 14, 2011, 2:27:21 PM2/14/11
to KML Developer Support - Google Earth Plug-in
When using ge.createTimeStamp(id) and createTimeSpan(id), id must be a
unique identifier and must always be different each time you call the
function. If you fail to do this, you will get (at least) an NPObject
error. I just give it a current UNIX timestamp, but that may not work
in some situations.

var d = new Date();
var tspan = ge.createTimeStamp(d.getTime().toString());

The same issue annoyed me for quite a while.
Reply all
Reply to author
Forward
0 new messages