|
|
|||||||
|
We also encourage developers to take advantage of the View-Based Refresh ability of our Network Link. When the view-based refresh is active, the network link will return the coordinates (west, south, east, north) of the user's viewing window to your server. This will allow you to parse the user's location and return KML specific to that user's current view. (For example, if your network link source was a Perl script, a user looking at San Francisco might return something like http://your.server.com/source_file.pl?BBOX=-122.522859,37.721792,,-122.359974,37.813426 . If you have a lot of data spread out over a wide area, it should be obvious how this feature not only allows you to use bandwidth very efficiently, but also allows you to present the user with a clean, dynamic visual experience. Note also that with careful parsing of the coordinates of the bounding box, it is possible to calculate an approximation of the user's altitude. Several Keyhole users have asked for the ability to simulate the LOD-type display of data (i.e. dynamically displaying more data as the user's viewpoint gets closer to the ground). This is now possible. The KML tutorial document has some sample PHP code that shows you how to parse the user's location and return a placemark centered in the user's viewing window. That is a very simple application, but already we've seen people using the feature in some very creative ways. |