| It Takes Two To Tango. The first thing we need to do is establish back and forth communication between Google Earth and the webserver. Google Earth is going to pass the center point and the bounding box using a Network Link and the <viewFormat> tag, pass it to a PHP page, and the PHP page is going to return KML. | |
| Gotcha: Make sure the <viewRefreshMode> is set to onStop so the parameters are updated everytime the viewer moves. |
| The easiest way to make these parameters useful is to embed them as part of a hyperlink in the <Snippet> tag. That way you can send them to another page with the current screen info passed along. | |
| Gotcha: It's important to send an HTTP header before your KML so the receiving machine knows to pipe the KML directly to Google Earth rather than to the browser itself. |
| For interactive analysis, hard-coding parameters will not get you very far. Adding in a rudimentary web form gives the user simple choice without a lot of complication. | |
| Gotcha: You have to pass along the original center lat/long on to yet another server script. |