One of my tasks for the AusStage website has been the development of a browse interface. This interface allows users to see information about events associated with venues on a map. Currently there are over 1000 venues that can be looked at in this way.
As with all of my mapping work the development has been in two parts, the first is a web page built using the Google Maps API and the second is an export of the data in the Keyhole Markup Language (KML) format. The KML data is checked to ensure it adheres to the standard and is also tested using Google Earth.
For the browse map I needed to specify a location that Google Earth would pan and zoom too by default when the KML file was opened. Ordinarily Google Earth does a good job of selecting an appropriate default location but for some reason with this map the location chosen was away from the main cluster of placemarks.
To do this I used a LookAt element, associated with the main document element. The relevant KML snippet looks like this:
<kml>
<Folder>
<Document>
<LookAt>
<longitude>133.209639</longitude>
<latitude>-25.947028</latitude>
<heading>0</heading>
<range>6735030</range>
</LookAt>
</Document>
</Folder>
</kml>
The important parts are the longitude and latitude elements, these specify the location to look at, and the range element which specifies how far away the camera should be when looking at the specified location. If you leave out the range element the camera is all the way on the ground and you can’t see anything. In testing the range parameter has shown to be sufficient to provide a good overview of Australia. The coordinates specified map approximately to the centre of Australia.
I used information from the Geoscience Australia website in determining the coordinates to use. They have a very interesting page about all the different ways to calculate the “centre of Australia”. These are the same coordinates that I’ve been using for a while now when developing the other mapping components of the system.
The placemarks for the venues are then listed after the LookAt element as children of the Document element. Other information included in the KML, such as descriptions and styles, is also included in the KML by default and is not listed here for clarity.
The photo “2006 Geographical Centre of Australia geocoin” was uploaded to Flickr by Steve Burke and used under the terms of a Creative Commons License.
