So, we’ve looked at generating classes from the KML schema, and we’ve looked at creating a Network Link to send our KML markup to Google Earth. Today, we’ll look at how Google Earth tells us where the user is looking at.
It turns out that they use a very simple mechanism. When the network link sends a new GET request to the server, it passes a parameter “BBOX” on the query-string. Accessing this parameter is simple:
The BBOX parameter consists of a comma-separated list of 4 lines of latitude/longitude, representing west, south, east, and north respectively.
string coords = ((string)context.Request.Params["BBOX"]).Split(",".ToCharArray()); double west = double.Parse(coords); double south = double.Parse(coords); double east = double.Parse(coords); double north = double.Parse(coords);
Using these you can limit the data you return to things the user can see.