Real-time data visualization using any Earth API
How do I create something like this video (1-2 minutes http://www.ted.com/index.php/talks/sergey_brin_and_larry_page_on_google.html ) using the "Google Earth API" or other?
Specifically: I have an online game and want to show dynamic data about some "virtual land". 3 types of objects that change their state in real time. This is enough to update every 5 seconds. I already have an open api.
The problem is I don't know if it is possible to draw something like colored lines from the sphere of the sphere and change them dynamically.
Sorry for the abstract question, but the goal is the same.
a source to share
Ok, if you are using the Google Earth API (requires the Google Earth plugin to be installed), you can just create a bunch of extruded polygons. For example, if you go to the Earth API Interactive Sampler and paste / run this:
var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
var lat = lookAt.getLatitude();
var lng = lookAt.getLongitude();
// first create inner and outer boundaries
// outer boundary is a square
var outerBoundary = ge.createLinearRing('');
var coords = outerBoundary.getCoordinates();
coords.pushLatLngAlt(lat - 0.5, lng - 0.5, 1000000);
coords.pushLatLngAlt(lat - 0.5, lng + 0.5, 1000000);
coords.pushLatLngAlt(lat + 0.5, lng + 0.5, 1000000);
coords.pushLatLngAlt(lat + 0.5, lng - 0.5, 1000000);
// create the polygon and set its boundaries
var polygon = ge.createPolygon('');
polygon.setExtrude(true);
polygon.setAltitudeMode(ge.ALTITUDE_RELATIVE_TO_GROUND);
polygon.setOuterBoundary(outerBoundary);
// create the polygon placemark and add it to Earth
var polygonPlacemark = ge.createPlacemark('');
polygonPlacemark.setGeometry(polygon);
ge.getFeatures().appendChild(polygonPlacemark);
// persist the placemark for other interactive samples
window.placemark = polygonPlacemark;
window.polygonPlacemark = polygonPlacemark;
You will see a 3D polygon extruded from the globe.
There is a lot you can do there; I suggest playing with the Earth API and KML (the foundation for the geometry primitives in the Earth API) by visiting code.google.com/apis/earth and code.google.com/apis/kml.
a source to share