The Visual Studio version selector, is a really useful tool, but way too often it comes up with “Version: unrecognized version”, and won’t allow you to open your files. So how do you get from here to there?
This has been reported to Microsoft who have responded that this is “by design”. Wow – must have been a shitty design then!
The upshot is that the version selector is really picky about what it allows in terms of white-space. Unix-encoding for your line-terminators? BZZZZZT! A blank line to start the file? BZZZZZT!
Make sure you are using Windows encoding for your file (Notepad++ is very useful for this: Edit → EOL Conversion → Windows Encoding), and that there are no blank lines at the start of the file. There are a few other ways you could break it with white-space, but they’re the two my source-control seems to like to do.
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 =
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.
Whenever I’m starting a new site, I go to ThemeRoller to start me off. The final design is usually completely different, but it allows me to concentrate on the back-end of the site, knowing that the UI is clean and functional.