Index: trunk/src/inc/KMLFile.class.php
===================================================================
--- trunk/src/inc/KMLFile.class.php	(revision 7773)
+++ trunk/src/inc/KMLFile.class.php	(revision 7775)
@@ -5,4 +5,8 @@
  * Purpose: Creating of editing KML files
  */
+
+define('NODE_STATUS_UP', 0);
+define('NODE_STATUS_ERROR', 1);
+define('NODE_STATUS_UNREACHABLE', 2);
 
 class KMLFile {
@@ -13,4 +17,18 @@
 				<open>1</open>
 				<description>Wireless Leiden Interactive Nodemap 2.0</description>
+				<LookAt>
+					<longitude>%OVERALL_LONGITUDE%</longitude>
+					<latitude>%OVERALL_LATITUDE%</latitude>
+					<altitude>%OVERALL_ALTITUDE%</altitude>
+					<heading>%OVERALL_HEADING%</heading>
+					<tilt>%OVERALL_TILT%</tilt>
+					<range>%OVERALL_RANGE%</range>
+				</LookAt>
+				<Style id="blackLine"> 
+					<LineStyle>
+						<color>%LINE_BLACK%</color>
+						<width>3</width>
+					</LineStyle>
+				</Style>
 				<Style id="greenArrowIcon">
 					<IconStyle>
@@ -34,20 +52,14 @@
 					</IconStyle>
 				</Style>
-				<Style id="blackLine"> 
-					<LineStyle>
-						<color>%LINE_BLACK%</color>
-						<width>3</width>
-					</LineStyle>
-				</Style>
 				<Folder id="nodes">
 					<name>Nodes</name>
 					<description>Nodes from the Wireless Leiden network</description>
 					<LookAt>
-						<longitude>4.490153</longitude>
-						<latitude>52.161087</latitude>
-						<altitude>5</altitude>
-						<heading>0</heading>
-						<tilt>0</tilt>
-						<range>500</range>
+						<longitude>%OVERALL_LONGITUDE%</longitude>
+						<latitude>%OVERALL_LATITUDE%</latitude>
+						<altitude>%OVERALL_ALTITUDE%</altitude>
+						<heading>%OVERALL_HEADING%</heading>
+						<tilt>%OVERALL_TILT%</tilt>
+						<range>%OVERALL_RANGE%</range>
 					</LookAt>
 					%NODESCONTENT%
@@ -57,10 +69,10 @@
 					<description>Lines from nodes to nodes from the Wireless Leiden network</description>
 					<LookAt>
-						<longitude>4.490153</longitude>
-						<latitude>52.161087</latitude>
-						<altitude>5</altitude>
-						<heading>0</heading>
-						<tilt>0</tilt>
-						<range>500</range>
+						<longitude>%OVERALL_LONGITUDE%</longitude>
+						<latitude>%OVERALL_LATITUDE%</latitude>
+						<altitude>%OVERALL_ALTITUDE%</altitude>
+						<heading>%OVERALL_HEADING%</heading>
+						<tilt>%OVERALL_TILT%</tilt>
+						<range>%OVERALL_RANGE%</range>
 					</LookAt>
 					%LINESCONTENT%
@@ -146,4 +158,11 @@
 		$toString = str_replace('%LINESCONTENT%', $lineString, $toString);
 
+		$toString = str_replace('%OVERALL_LONGITUDE%', $config['overall_longitude'], $toString);
+		$toString = str_replace('%OVERALL_LATITUDE%', $config['overall_latitude'], $toString);
+		$toString = str_replace('%OVERALL_ALTITUDE%', $config['overall_altitude'], $toString);
+		$toString = str_replace('%OVERALL_HEADING%', $config['overall_heading'], $toString);
+		$toString = str_replace('%OVERALL_TILT%', $config['overall_tilt'], $toString);
+		$toString = str_replace('%OVERALL_RANGE%', $config['overall_range'], $toString);
+
 		return $toString;
 	}
@@ -218,9 +237,28 @@
 
 			// Creating a string with the complete description of the node using all data in the location file
-			$descriptionLocation = 'Naam: ' . $name . '<br/>Locatie: ' . $location . '<br/>Status: ' . $status . '<br/>Latitude: ' . $latitude . '<br/>Longitude: ' . $longitude . '<br/>Interfaces: ' . $interfaces . '<br/>Master IP: ' . $masterip . '<br/>Node type: ' . $nodetype . '<br/><br/>';
+			$dataLocation = '
+				<Data name="location">
+					<value>
+						<![CDATA[
+							' . $location . '
+						]]>
+					</value>
+				</Data>
+				<Data name="status">
+					<value>' . $status . '</value>
+				</Data>
+				<Data name="interfaces">
+					<value>' . $interfaces . '</value>
+				</Data>
+				<Data name="masterIP">
+					<value>' . $masterip . '</value>
+				</Data>
+				<Data name="nodeType">
+					<value>' . $nodetype . '</value>
+				</Data>';
 
 			if ($placemarkPosition = $this->getNodeByName($name)) {
 				// Updating an excisting placemark
-				$this->KMLNodes[$placemarkPosition]->setDescriptionLocation($descriptionLocation);
+				$this->KMLNodes[$placemarkPosition]->setDataLocation($dataLocation);
 				$this->KMLNodes[$placemarkPosition]->setLongitude($longitude);
 				$this->KMLNodes[$placemarkPosition]->setLatitude($latitude);
@@ -230,5 +268,5 @@
 				$placemark->setID($name);
 				$placemark->setName($name);
-				$placemark->setDescriptionLocation($descriptionLocation);
+				$placemark->setDataLocation($dataLocation);
 				$placemark->setLongitude($longitude);
 				$placemark->setLatitude($latitude);
@@ -259,8 +297,49 @@
 					$this->NetworkList->add($network);
 
+					$data =	'
+						<Data name="netmaskDecimal">
+							<value>' . $network->netmaskDecimal . '</value>
+						</Data>
+						<Data name="netmaskBinary">
+							<value>' . $network->netmaskBinary . '</value>
+						</Data>
+						<Data name="wildcardDecimal">
+							<value>' . $network->wildcardDecimal . '</value>
+						</Data>
+						<Data name="wildcardBinary">
+							<value>' . $network->wildcardBinary . '</value>
+						</Data>
+						<Data name="networkDecimal">
+							<value>' . $network->networkDecimal . '</value>
+						</Data>
+						<Data name="networkBinary">
+							<value>' . $network->networkBinary . '</value>
+						</Data>
+						<Data name="broadcastDecimal">
+							<value>' . $network->broadcastDecimal . '</value>
+						</Data>
+						<Data name="broadcastBinary">
+							<value>' . $network->broadcastBinary . '</value>
+						</Data>
+						<Data name="hostMinDecimal">
+							<value>' . $network->hostminDecimal . '</value>
+						</Data>
+						<Data name="hostMinBinary">
+							<value>' . $network->hostminBinary . '</value>
+						</Data>
+						<Data name="hostMaxDecimal">
+							<value>' . $network->hostmaxDecimal . '</value>
+						</Data>
+						<Data name="hostMaxBinary">
+							<value>' . $network->hostmaxBinary . '</value>
+						</Data>
+						<Data name="hosts">
+							<value>' . $network->numberHosts . '</value>
+						</Data>';
+
 					$line = new KMLLine();
-					$line->setID($network->networkDecimal);
+					$line->setID(str_replace('.', '', $network->networkDecimal));
 					$line->setName('Link: Van ' . $name . ' naar ');
-					$line->setDescription($network->toString());
+					$line->setData($data);
 					$line->setLongitude1($longitude);
 					$line->setLatitude1($latitude);
@@ -334,9 +413,41 @@
 
 			// Creating a string with the complete description of the node using all data in the status file
-			$descriptionStatus = 'Type: ' . $lineContent[0] . '<br/>Host name: ' . $lineContent[1] . '<br/>Has been checked: ' . $lineContent[2] . '<br/>Check execution time: ' . $lineContent[3] . '<br/>Currenr state: ' . $lineContent[4] . '<br/>Last hard state: ' . $lineContent[5] . '<br/>Last check: ' . $lineContent[6] . '<br/>Problem has been acknowledged: ' . $lineContent[7] . '<br/><br/>';
+			$dataStatus = '
+				<Data name="type">
+					<value>' . $lineContent[0] . '</value>
+				</Data>
+				<Data name="hostName">
+					<value>' . $lineContent[1] . '</value>
+				</Data>
+				<Data name="hasBeenChecked">
+					<value>' . $lineContent[2] . '</value>
+				</Data>
+				<Data name="checkExecutionTime">
+					<value>' . $lineContent[3] . '</value>
+				</Data>
+				<Data name="currentState">
+					<value>' . $lineContent[4] . '</value>
+				</Data>
+				<Data name="lastHardState">
+					<value>' . $lineContent[5] . '</value>
+				</Data>
+				<Data name="lastCheck">
+					<value>' . $lineContent[6] . '</value>
+				</Data>
+				<Data name="problemHasBeenAcknowledged">
+					<value>' . $lineContent[7] . '</value>
+				</Data>';
+
+			$style = NODE_RED;
+			if ($lineContent[4] == NODE_STATUS_ERROR) {
+				$style = NODE_ORANGE;
+			} elseif ($lineContent[4] == NODE_STATUS_UP) {
+				$style = NODE_GREEN;
+			}
 
 			if ($placemarkPosition = $this->getNodeByName($lineContent[1])) {
 				// Updating an excisting placemark
-				$this->KMLNodes[$placemarkPosition]->setDescriptionStatus($descriptionStatus);
+				$this->KMLNodes[$placemarkPosition]->setDataStatus($dataStatus);
+				$this->KMLNodes[$placemarkPosition]->setStyle($style);
 			} else {
 				// Adding a new placemark
@@ -344,5 +455,6 @@
 				$placemark->setID($lineContent[1]);
 				$placemark->setName($lineContent[1]);
-				$placemark->setDescriptionStatus($descriptionStatus);
+				$placemark->setDataStatus($dataStatus);
+				$placemark->setStyle($style);
 				$this->addNode($placemark);
 			}
Index: trunk/src/inc/KMLLine.class.php
===================================================================
--- trunk/src/inc/KMLLine.class.php	(revision 7773)
+++ trunk/src/inc/KMLLine.class.php	(revision 7775)
@@ -6,5 +6,5 @@
  */
 
-define('LINE_BLACK', 'blackLine');
+define('LINE_BLACK', '#blackLine');
 
 class KMLLine {
@@ -12,23 +12,21 @@
 		<Placemark id="%ID%">
 			<name>%NAME%</name>
-			<description>
-				<![CDATA[
-					<img src="http://www.wirelessleiden.nl/sites/wirelessleiden.nl/files/garland-wl_logo.png" alt="Wireless Leiden" title="Wireless Leiden" style="float: right;"/>
-					%DESCRIPTION%
-				]]>
-			</description>
+			<description>%NAME%</description>
 			<LookAt>
 				<longitude>%LONGITUDE1%</longitude>
 				<latitude>%LATITUDE1%</latitude>
-				<altitude>0</altitude>
-				<heading>0</heading>
-				<tilt>0</tilt>
-				<range>500</range>
+				<altitude>%OVERALL_ALTITUDE%</altitude>
+				<heading>%OVERALL_HEADING%</heading>
+				<tilt>%OVERALL_TILT%</tilt>
+				<range>%OVERALL_RANGE%</range>
 			</LookAt>
+			<ExtendedData>                       
+				%EXTENDEDDATA%
+			</ExtendedData>
 			<styleUrl>%STYLE%</styleUrl>
 			<LineString>
 				<coordinates>
-					%LONGITUDE1%, %LATITUDE1%, 0. 
-					%LONGITUDE2%, %LATITUDE2%, 0.
+					%LONGITUDE1%,%LATITUDE1%,0. 
+					%LONGITUDE2%,%LATITUDE2%,0.
 				</coordinates>
 			</LineString>
@@ -37,5 +35,5 @@
 	private $id;					// ID of the line
 	private $name;					// Name of the line
-	private $description;			// Description of the line
+	private $data;					// Extra information of the line
 	private $style;					// Style of the line
 	private $longitude1;			// Start longitude of line
@@ -94,11 +92,11 @@
 
 	/*
-	 * Function: setDescription
-	 * Description: Setting the description of the placemark
-	 * Parameters: string $newDescription
+	 * Function: setData
+	 * Description: Setting the extra data of the placemark
+	 * Parameters: string $newData
 	 * Returns: -
 	 */
-	function setDescription($newDescription) {
-		$this->description = (string) $newDescription;
+	function setData($newData) {
+		$this->data = (string) $newData;
 	}
 
@@ -179,5 +177,5 @@
 		$toString = str_replace('%ID%', $this->id, $toString);
 		$toString = str_replace('%NAME%', $this->name, $toString);
-		$toString = str_replace('%DESCRIPTION%', $this->description, $toString);
+		$toString = str_replace('%EXTENDEDDATA%', $this->data, $toString);
 		$toString = str_replace('%STYLE%', $this->style, $toString);
 		$toString = str_replace('%LONGITUDE1%', $this->longitude1, $toString);
Index: trunk/src/inc/KMLNode.class.php
===================================================================
--- trunk/src/inc/KMLNode.class.php	(revision 7773)
+++ trunk/src/inc/KMLNode.class.php	(revision 7775)
@@ -6,7 +6,7 @@
  */
 
-define('NODE_GREEN', 'greenArrowIcon');
-define('NODE_ORANGE', 'orangeArrowIcon');
-define('NODE_RED', 'redArrowIcon');
+define('NODE_GREEN', '#greenArrowIcon');
+define('NODE_ORANGE', '#orangeArrowIcon');
+define('NODE_RED', '#redArrowIcon');
 
 class KMLNode {
@@ -14,18 +14,16 @@
 		<Placemark id="%ID%">
 			<name>%NAME%</name>
-			<description>
-				<![CDATA[
-					<img src="http://www.wirelessleiden.nl/sites/wirelessleiden.nl/files/garland-wl_logo.png" alt="Wireless Leiden" title="Wireless Leiden" style="float: right;"/>
-					%DESCRIPTION%
-				]]>
-			</description>
+			<description>%NAME%</description>
 			<LookAt>
 				<longitude>%LONGITUDE%</longitude>
 				<latitude>%LATITUDE%</latitude>
-				<altitude>0</altitude>
-				<heading>0</heading>
-				<tilt>0</tilt>
-				<range>500</range>
+				<altitude>%OVERALL_ALTITUDE%</altitude>
+				<heading>%OVERALL_HEADING%</heading>
+				<tilt>%OVERALL_TILT%</tilt>
+				<range>%OVERALL_RANGE%</range>
 			</LookAt>
+			<ExtendedData>                       
+				%EXTENDEDDATA%
+			</ExtendedData>
 			<styleUrl>%STYLE%</styleUrl>
 			<Point>
@@ -35,11 +33,11 @@
 		</Placemark>';
 
-	private $id;					// ID of the node
-	private $name;					// Name of the node
-	private $descriptionLocation;	// Location information of the node
-	private $descriptionStatus;		// Status information of the node
-	private $longitude;				// Longitude of the node
-	private $latitude;				// Latitude of the node
-	private $style;					// Style of the node
+	private $id;				// ID of the node
+	private $name;				// Name of the node
+	private $dataLocation;		// Location information of the node
+	private $dataStatus;		// Status information of the node
+	private $longitude;			// Longitude of the node
+	private $latitude;			// Latitude of the node
+	private $style;				// Style of the node
 
 	/*
@@ -52,9 +50,9 @@
 		$this->id = '';
 		$this->name = '';
-		$this->descriptionLocation = '';
-		$this->descriptionStatus = '';
+		$this->dataLocation = '';
+		$this->dataStatus = '';
 		$this->longitude = 0;
 		$this->latitude = 0;
-		$this->style = 'orangeArrowIcon';
+		$this->style = NODE_RED;
 	}
 
@@ -95,6 +93,6 @@
 	 * Returns: -
 	 */
-	function setDescriptionLocation($newDescriptionLocation) {
-		$this->descriptionLocation = (string) $newDescriptionLocation;
+	function setDataLocation($newDataLocation) {
+		$this->dataLocation = (string) $newDataLocation;
 	}
 
@@ -105,6 +103,6 @@
 	 * Returns: -
 	 */
-	function setDescriptionStatus($newDescriptionStatus) {
-		$this->descriptionStatus = (string) $newDescriptionStatus;
+	function setDataStatus($newDataStatus) {
+		$this->dataStatus = (string) $newDataStatus;
 	}
 
@@ -150,5 +148,5 @@
 		$toString = str_replace('%ID%', $this->id, $toString);
 		$toString = str_replace('%NAME%', $this->name, $toString);
-		$toString = str_replace('%DESCRIPTION%', $this->descriptionLocation . $this->descriptionStatus, $toString);
+		$toString = str_replace('%EXTENDEDDATA%', $this->dataLocation . $this->dataStatus, $toString);
 		$toString = str_replace('%LONGITUDE%', $this->longitude, $toString);
 		$toString = str_replace('%LATITUDE%', $this->latitude, $toString);
